From be64882280cef77749e89a7785905fe3cc3efc5c Mon Sep 17 00:00:00 2001 From: brianc Date: Tue, 12 Apr 2011 14:05:43 -0700 Subject: [PATCH] added documentation on notice and notification events --- Client.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Client.md b/Client.md index 5e2759b..0814ba0 100644 --- a/Client.md +++ b/Client.md @@ -302,6 +302,7 @@ Raised when the client recieves an error message from PostgreSQL _or_ when the u Used for "LISTEN/NOTIFY" interactions. You can do some fun pub-sub style stuff with this. +##### example ```javascript var client1 = new Client(...) var client2 = new Client(...) @@ -323,6 +324,7 @@ Used for "LISTEN/NOTIFY" interactions. You can do some fun pub-sub style stuff Emitted from PostgreSQL server when non-critical events happen. Libpq `printf`'s these out to stdout if the behavior is not overridden. Yucky. Thankfully node-postgres overrides the default behavior and emits an event (instead of printing to stdout) on the client which received the notice event. +##### example ```javascript var client = new Client(...) client.on('notice', function(msg) {