Questions tagged [pg]

0 votes
1 replies
PG::SyntaxError at /bookmarks - I'm unable to work out why the SQL query is wrong
When running my application using sinatra, I get the error message PG::SyntaxError at /bookmarks ERROR: syntax error at or near "{" LINE 1: SELEC...
asked 1 month ago
0 votes
1 replies
What does a node pg Client connect return
Pretty simple question, whether or not it can be answered I don't know. Issue is im running some tests to verify whether or not I connected to a...
asked 2 months ago
0 votes
0 replies
PostgreSQL PG Gem Select Records Last 30 Days
I'm trying to select records in the past 30 days in PostgreSQL. I've simplified it for testing down to this PG connection, just to find records...
asked 2 months ago
1 votes
1 replies
Error connecting to posgresql database using pg on windows
I've got a PostgreSQL database, definitely existing because I can connect to it and make SQL query using psql. However, when I try to connect wi...
asked 3 months ago
0 votes
1 replies
An error occurred while installing pg (1.0.0), and Bundler cannot continue
I'm trying to deploy Zipsell with heroku. However when I run through the heroku and ruby setup and try to deploy via: git clone https://github.c...
asked 3 months ago
0 votes
1 replies
Ruby PG Gem Using TextEncoder::Array for SELECT WHERE fieldname IN exec_params
I need to search for id field from an array. I'm using the PG gem, so I'm thinking I should be using TextEncoder::Array.new.encode(myarray) to s...
asked 4 months ago
0 votes
0 replies
pg client connect causes child_process.execFile to hang
child_process.execFile seems to hang when pg.Client() connection is open. I was able to narrow it down to that for as soon as I comment out the...
2 votes
2 replies
Execute SQL select in statement using pygresql(pg module)
I am working on a python script to connect to postgress databases using pygresql module. Below is the code I am trying to run the query by passi...
asked 3 months ago
0 votes
0 replies
storying long decimal numbers with knex node heroku pg
I'm using google maps api to store latitude and longitude in a heroku pg database. I'm dealing with long decimal numbers like 47.620570445175. I'...
asked 4 months ago
1 votes
0 replies
delayed_job not able to connect to PG
I am using delayed_jobs for running some tasks in background. But sometimes it throws (PG::UnableToSend: no connection to the server) error ERRO...
0 votes
0 replies
node postgres sync/async query over same method
I'm using pg package and I want to prepare a method that makes a sync or async query on the database according to whether the callback method is...
4 votes
1 replies
socket.io duplicate emit events on browser refresh
I'm running into an issue with my socket.io implementation and don't know how to solve it. I'm using pg_notify with LISTEN so when a certain valu...
asked 5 months ago
0 votes
0 replies
PG::TextEncoder::Array for Bulk Insert?
I'm needing to build some bulk inserts for PostgreSQL in ruby. I can build a ruby array, but I'm uncertain how to proceed to the sql syntax. I...
asked 5 months ago
0 votes
1 replies
Rails How to use model with params in view
I want to make suggested product show up on show page I have this in my model(i am using pg) //Product model def self.similar(product_name)...
asked 4 months ago
0 votes
1 replies
How do i fix: bind message supplies 3 parameters, but prepared statement “” requires 2, error in redux?
I currently have a query for distance that is working. I am trying to add another parameter for type to order by both parameters. When I add type...
asked 5 months ago
0 votes
0 replies
PG connection to RDS via SSH tunnel through ec2 instance
I want to query a db using a serverless function so I need to ssh-tunnel through a landing node for the rds query. However, this isn't working...
asked 1 month ago
1 votes
3 replies
ActionView::Template::Error (PG::UndefinedColumn: ERROR: column posts.user_id does not exist
my code is working fine on my system in development mode but when i pushed to heroku, i am getting this error on the logs. i'm on Rails 5.2.3 &a...
asked 1 month ago
0 votes
1 replies
“Error: Please install pg package manually” when trying to run “npm run serve:dev”?
I'm trying to run an app with script npm run serve:dev but it gives an error Error: Please install pg package manually when trying to run npm run...
asked 3 months ago
0 votes
1 replies
“Error: Please install pg package manually” when trying to run “npm run serve:dev”?
I'm trying to run an app with script npm run serve:dev but it gives an error Error: Please install pg package manually when trying to run npm run...
asked 3 months ago
0 votes
0 replies
Rails with PostgreSQL can't order records by value, get PG::InvalidColumnReference: ERROR
I have a model called "Candidate", has "status" column is string. I would like to order records by status from 'New' to 'Pending'. My code worked...
0 votes
0 replies
Close Sinatra PG Connections Where?
I'm using Ruby, Sinatra and PostgreSQL using the PG gem. Wonderful stack. Just wondering when to close my connections that are initiated in the...
asked 2 months ago
0 votes
0 replies
NodeJS pg module doesn't rollback inside a transaction
When I try to rollback inside a transaction: const client = await pool.connect() try { await client.query('BEGIN') const result = await...
asked 3 months ago
0 votes
1 replies
Bundle install a local pg gem without internet access
I'm on a remote server with no internet access. Have a Rails app. Trying to bundle install (All gems were cached using bundle package --all to ap...
asked 4 months ago
0 votes
0 replies
Query building with postgresql and node-pg
I have a question around building a query in an efficient manner. At present to do an INSERT I have the following async function saveFixture(f)...
asked 5 months ago
1 votes
1 replies
How to mock pg Pool with Sinon
In a previous project I mocked the mysql library with Sinon. I did this like so: X.js: const con = mysql.createPool(config.mysql); ... Some...
asked 4 months ago