From eff7f4dd0a6bcd4bd30907cc17855dbdd6d937f3 Mon Sep 17 00:00:00 2001 From: brianc Date: Tue, 31 May 2011 15:13:08 -0700 Subject: [PATCH] Updated FAQ (markdown) --- FAQ.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FAQ.md b/FAQ.md index a54a7df..a932ccc 100644 --- a/FAQ.md +++ b/FAQ.md @@ -66,6 +66,12 @@ This fails with: ^ ReferenceError: Client is not defined +When you import the postgres library you commonly do `require('pg')`. This works and requires the 'root' of the library with various properties hanging off of it. To directly instantiate a specific client instance instead of using the pool you can access the client constructor off the the imported pg object. +1. `var Client = require('pg').Client;` + +or for the native client + +2. `var Client = require('pg').native.Client;` Thank you Brian. pg is excellent. \ No newline at end of file