Skip to content

Commit e7fc7f6

Browse files
committed
Update readme
1 parent 4b8dedd commit e7fc7f6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ const sql = postgres('postgres://username:password@host:port/database', {
4747
ssl : false, // True, or options for tls.connect
4848
max : 10, // Max number of connections
4949
timeout : 0, // Idle connection timeout in seconds
50-
types : [], // Custom types, see more below
51-
onnotice : fn // Any NOTICE the db sends will be posted here
52-
onparameter : fn // Callback with key, value for server params
50+
types : [], // Array of custom types, see more below
51+
onnotice : fn // Defaults to console.log
52+
onparameter : fn // (key, value) when server param change
5353
debug : fn // Is called with (connection, query, parameters)
5454
transform : {
5555
column : fn, // Transforms incoming column names
@@ -428,13 +428,8 @@ This error is thrown if the user has called [`sql.end()`](#sql_end) and performe
428428
This error is thrown for any queries that were pending when the timeout to [`sql.end({ timeout: X })`](#sql_destroy) was reached.
429429

430430

431-
## NOTICE using `onnotice`
432-
433-
nb. You can use [`onnotice`](#onnotice) to listen to any Postgres `NOTICE` sent on connections. But note that this will be called for every singlee connection to the database.
434-
435-
436431
## Thank you
437432

438433
A really big thank you to @JAForbes who introduced me to Postgres and still holds my hand navigating all the great opportunities we have.
439434

440-
Thanks to @ACXgit for initial tests.
435+
Thanks to @ACXgit for initial tests and dogfooding.

0 commit comments

Comments
 (0)