Skip to content

PgPool parameterized queries #1255

@ghost

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;
});

});
});
/////////////////////////////////////////////////////////////////////////

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions