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
-1
votes
1 answer

pg_ext.so: undefined symbol: rb_thread_select

bash-4.2# rake db:create /opt/rubystack-2.3.1-0/ruby/bin/.ruby.bin: symbol lookup error: /opt/rubystack-2.3.1-0/ruby/lib/ruby/gems/2.3.0/gems/pg-0.18.4/lib/pg_ext.so: undefined symbol: rb_thread_select bash-4.2# ruby -v ruby 2.3.1p112 (2016-04-26…
Albert.Qing
  • 4,220
  • 4
  • 37
  • 49
-1
votes
1 answer

Displaying multiple copies of one activerecord object

I am displaying a list of articles and using will_paginate gem and endless scrolling. This is all working fine. My problem, however, is that I am occasionally getting multiple copies of the same article in the view. It doesn't happen all the time,…
MarkD
  • 65
  • 1
  • 7
-1
votes
1 answer

Specific records locked for update after rake task on heroku

I have a really weird error and I can't seem to fix it. Basically I ran a rake task which updated all phone numbers on a site to themselves to take advantage of phony normalisation i.e. they were all in different formats for few thousand records,…
Carpela
  • 2,155
  • 1
  • 24
  • 55
-1
votes
1 answer

Error accessing localhost:3000 with postresql set as the development db in Rails app

So I have typically used Sqlite3 in Development but wanted to try PG. Here is the error I got. Why? PG::ConnectionBad could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP…
user3174983
  • 85
  • 3
  • 12
-1
votes
2 answers

How to access the data that was inserted into the Rails app ? (Beginner)

can someone help me google a tutorial how to access the data that was inserted into a rails app. group :development do gem 'sqlite3' end group :production do gem 'pg' end I know this is where it is stored, just could not find a good step by…
-2
votes
1 answer

Records are lost when sax inserts into a database in batches

I read a gz file using sax and zlib and then update my db, its seems that i skipped some of my file content. This is my code: // variables to demonstrate the weired behovior let recordsNum = 1; let recordsNum2 = 1; let numOfFailed = 0; async…
Bennyh961
  • 85
  • 1
  • 7
-2
votes
1 answer

Paytm PG too many 810 status

I successfully docked to paytm's payment gateway. The API interfaces I called are: Initiate transaction API Show payment page My test works well, but in the production environment, the payment success rate is very low and there are too many 810…
fei su
  • 1
-2
votes
1 answer

use result of data from database to App.js

Ive got this code so far on a pg.js ... i want to use the result of {rows} ... in my App.js.. i tryed evreything ... I cant get it to work I need help. thanks const {Client} = require('pg'); const client = new Client({ ... ssl: { …
-2
votes
2 answers

How can I connect my ruby app to Heroku postgres database?

I have a ruby app running on heroku, I am trying to connect it to a Heroku postgres database. I have installed the add-on and bundled the 'pg' gem. I tried running PG.connect(dbname:d6td9jdn7irk0u) Only resulting in this: PG::ConnectionBad: could…
-2
votes
1 answer

Syntax error while comparing timestamps in PostgreSQL

Error: "syntax error at or near interval" Join in question: ... LEFT OUTER JOIN usersession e ON a.userID = e.userID AND e.lastAction >= now() interval '-4h' * 1" lastAction was created as lastAction timestamp NULL DEFAULT NULL The idea is, to…
dsp_099
  • 5,801
  • 17
  • 72
  • 128
-2
votes
1 answer

Can't install the pg gem

On Mac OS X 10.6.8, I get the following error when trying gem install pg. Trying to push my Rails website to Heroku. A pretty standard install of Ruby 1.9.3p194. $ cat /Users/me/.rvm/gems/ruby-1.9.3-p194\@ucode/gems/pg-0.15.1/ext/gem_make.out…
-3
votes
1 answer

PGSQL - Translate query results with foreign keys

I have two tables that describe items and products: Category: | categoryid | categoryname | | -------------| -----------------| | 1 | "a" | | 2 | "b" | Item: | itemid | itemname | |…
liron29
  • 72
  • 7
-3
votes
1 answer

Go and multiline argument hell

I was writting a wraper/validator over pg in go when I came upon a rather annoying thing... passing very long strings as argument. Basically I have this string: "UPDATE " + m["table"] + "_tags SET keys = keys || ," + strconv.Itoa(key) + " WHERE tag…
George H
  • 412
  • 3
  • 6
  • 12
-3
votes
1 answer

Concatenating an Array Text

how to add a TEXT within an Array? var_result text[]; var_result_valor text; var_legenda text; var_result_valor := '2.34'; var_legenda := 'Baixo'; Thus giving this error: var_result := [var_result_valor,var_legenda]
1 2 3
56
57