-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k

Description
Hi,
I am not able to get parameterized queries to work with pgpool. I am using pg@6.1.5, Postgres 9.6 and pgpool-II 3.6.1. When I run the parameterized query, it runs fine the first time (when it is not cached). When I run it again, the resultset is returned from the cache and it is empty. Here's a script that I am using to query the the DB.
/////////////////////////////////////////////////////////////////////////
var pg = require('pg');
// instantiate a new client
// the client will read connection information from the same environment variables used by postgres cli tools
var client = new pg.Client();
client.connect(function (err) {
if (err) throw err;
// execute a query on our database
client.query('SELECT * from table where id=$1', [1], function (err, result) {
if (err) throw err;
// just print the result to the console
console.log(result.rows[0]);
// disconnect the client
client.end(function (err) {
if (err) throw err;
});
});
});
/////////////////////////////////////////////////////////////////////////