Questions tagged [pg]

'pg' is the name of an extension for Ruby that provides access to libpq, the C application programmer’s interface to the PostgreSQL RDBMS.

pg is the name of an extension for Ruby that provides access to libpq, the C application programmer’s interface to the PostgreSQL RDBMS. It provides a relatively complete mapping, including both synchronous and asynchronous query interfaces, notifications, support for the COPY command, and m17n support under Ruby 1.9.

It includes full RDoc API documentation, a copy of which can be found on the maintainer's site.

It is currently maintained and developed by Michael Granger.

854 questions
0
votes
2 answers

What is the "-400", "-500" following the date in Time.now in ruby and is date compatible with postgres date field?

Ruby and postgres question: I am wanting to insert the date from a Ruby script into a postgres database. The database date format is: 2013-03-13 17:08:51.207184-04 in postgres. BTW, what is "51.207184-04" in the date field in the Postgres…
Doublespeed
  • 1,153
  • 4
  • 16
  • 29
0
votes
1 answer

PG::Error on running rails application

Ive installed PostgreSQL on my windows 7 (professional - service pack 1) machine (using the postgresql-9.1.8-2-windows-x64.exe) Im now trying to run my rails project (via Webrick port 3000) but unfortunately i get the following error: Any ideas?
Mulaiko
  • 536
  • 7
  • 23
0
votes
1 answer

Problems with Node.js and postgresql

I'm doing an app with express in node. I thought about different DBMS before coming up with the idea of using PostgreSQL (I haven't got any NoSQL experience) but it's bugging me out due to some unexpected errors. I'm trying to check if a user exist…
jontxu
  • 49
  • 2
  • 6
0
votes
1 answer

how to check difference betwen master and slave in slony replication?

I want to know how much the master lag behind the slave in teems of rows ? How can i see this ? I mean in which column ? I have tried to check sl_status table but i think it is not helpful. Thanks in advance
Neel Patel
  • 315
  • 2
  • 6
  • 17
0
votes
1 answer

pg gem error with Ruby on Rails

I'm on Mac OS X 10.8.2. I install Ruby+RVM using the RailsInstaller, so I am currently on ruby-1.9.3-p194. My application uses Rails 3.2.11. When I run bundle install, here's the error I see: Gem::Installer::ExtensionBuildError: ERROR: Failed to…
Ringo Blancke
  • 2,444
  • 6
  • 30
  • 54
0
votes
1 answer

Modifying ruby code to work with Postgresql

I was previously using sqlite3 for my ruby code and it worked fine for the following code def existsCheck( db, id ) temp = db.exec( 'SELECT 1 WHERE EXISTS( SELECT 1 FROM Products WHERE promoID = ? ) ', [id] ).length >…
rlhh
  • 893
  • 3
  • 17
  • 32
0
votes
1 answer

Not able to update my foreign key in the new method,using Devise for Users Table

I have Two models Users and Profiles ( Users is from devise ). A user can have many profiles , so i created a migration to add user_id to Profiles. class Profile < ActiveRecord::Base belongs_to :user attr_accessible :description, :name, :product,…
Mindtrades
  • 11
  • 2
0
votes
1 answer

"Resource not found" for Heroku PG commands

I got a free Heroku account and I'm working with: Rails 3.2.8 Heroku heroku-toolbelt/2.33.2 PG But, each time I'm typing a Heroku PG commands, I got this message: Resource not found! Except for the credentials command: ➜ heroku pg:credentials…
remjih
  • 313
  • 1
  • 9
0
votes
1 answer

Recurring Heroku PG Active Record Error, "column does not exist"

So, this is now the third time I've received this error over the course of working on this project I posted a question a few months back regarding this ActiveRecord::StatementInvalid (PG::Error: ERROR: column does not exist Heroku…
sonobenissimo
  • 191
  • 4
  • 14
0
votes
0 answers

Rails PG gem installation with db on remote server

Possible Duplicate: Installing postgres gem when database is on a different server I'm deploying a Rails app and for the first time I am running PostgreSQL on a separate machine from the app. Bundler fails while trying to install the pg gem on my…
Bruce
  • 387
  • 3
  • 14
0
votes
1 answer

Turning error_reporting on in php.ini kills my pg module

I have a wamp going on and just recently I had to switch from MySQL to PostgreSQL because of a new client. Here is how my errs was setup in my php.ini: display_errors Default Value: On Development Value: On Production Value: Off ;…
toy
  • 422
  • 1
  • 7
  • 19
0
votes
1 answer

How do you use send_query of the PG::Connection class in the Ruby pg gem?

How do you use the public instance method send_query of the PG::Connection class in the Ruby pg gem? Can it help speed up the execution time of a program like this? a = [1,2,3,4,5,6,...,100000] # elements in no specific order conn =…
Martin Velez
  • 1,379
  • 11
  • 24
0
votes
2 answers

Error Installing pg gem and running server after leopard to lion upgrade

Used a time machine backup to sync files from my macbook running Leopard to my macbook pro running Lion. After having trouble pushing to heroku due to the fact that I was running sqlite3, I went down a rabbit hole in trying to get a pg gem…
TronSawyer
  • 46
  • 1
  • 6
0
votes
1 answer

gem install pg error, Mac Lion

I'm on Mac OS 10.7.4, and I have the latest version of Xcode and the Command Line Tools installed. I'm getting an error (shown below) when I try to "gem install pg": gem install pg Building native extensions. This could take a while... ERROR: …
Rose Perrone
  • 61,572
  • 58
  • 208
  • 243
0
votes
2 answers

Optimise the PG query

The query is used very often in the app and is too expensive. What are the things I can do to optimise it and bring the total time to milliseconds (rather than hundreds of ms)? NOTES: removing DISTINCT improves (down to ~460ms), but I need to to…
Dmytrii Nagirniak
  • 23,696
  • 13
  • 75
  • 130