Update readme (#1210)

* Fix sample code in README

* Fix typo
This commit is contained in:
Patai Adam 2017-02-13 05:20:41 +01:00 committed by Brian C
parent f6c40b9331
commit 6e63f0e217

View File

@ -83,8 +83,8 @@ pool.connect(function(err, client, done) {
return console.error('error fetching client from pool', err); return console.error('error fetching client from pool', err);
} }
client.query('SELECT $1::int AS number', ['1'], function(err, result) { client.query('SELECT $1::int AS number', ['1'], function(err, result) {
//call `done()` to release the client back to the pool //call `done(err)` to release the client back to the pool (or destroy it if there is an error)
done(); done(err);
if(err) { if(err) {
return console.error('error running query', err); return console.error('error running query', err);