mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Fix error event doc in README (#15)
- making error event example code start by acquiring `pool` in the same way it is done in the example at the top for `create`
This commit is contained in:
parent
d316ef5524
commit
ce173f8c28
@ -189,8 +189,8 @@ Emitted whenever an idle client in the pool encounters an error. This is common
|
||||
Example:
|
||||
|
||||
```js
|
||||
var pg = require('pg')
|
||||
var pool = new pg.Pool()
|
||||
const Pool = require('pg-pool')
|
||||
const pool = new Pool()
|
||||
|
||||
// attach an error handler to the pool for when a connected, idle client
|
||||
// receives an error by being disconnected, etc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user