mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
parent
f6c40b9331
commit
6e63f0e217
@ -83,8 +83,8 @@ pool.connect(function(err, client, done) {
|
||||
return console.error('error fetching client from pool', err);
|
||||
}
|
||||
client.query('SELECT $1::int AS number', ['1'], function(err, result) {
|
||||
//call `done()` to release the client back to the pool
|
||||
done();
|
||||
//call `done(err)` to release the client back to the pool (or destroy it if there is an error)
|
||||
done(err);
|
||||
|
||||
if(err) {
|
||||
return console.error('error running query', err);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user