From d9c5d42154b4d49b7ea7d19cfda8d0c7f02785b1 Mon Sep 17 00:00:00 2001 From: sipajahava Date: Fri, 22 Feb 2013 19:40:27 -0800 Subject: [PATCH] Correct any db url --- pg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg.md b/pg.md index ee8a38c..eeb9fbb 100644 --- a/pg.md +++ b/pg.md @@ -11,7 +11,7 @@ First, it has a reference to the other components of node-postgres: The second purpose is more important: -__pg__ is an _instance_ of __EventEmitter__ which provides a somewhat naive implementation of __[[Client]]__ pooling. It has a function to retrieve __[[Client]]__ instances from a pool of available clients. You can bypass the __pg__ object all together and create __[[Client]]__ objects via their constructor (`new pg.Client()`); however, each __[[Client]]__ represents an open connection to your PostgreSQL server instance, and the initial connection handshake takes many times longer than a single query execution. Also, If you attempt to create and connect more __[[Client]]__ objects than supported connections to your PostgreSQL server you will encounter errors. This becomes especially painful if you manually instantiate a new __[[Client]]__ object per each http request to a web server. Once you receive more simultaneous requests to your web server than your PostgresSQL server can maintain you will be in a bad place...so it's recommended unless you have a particular case, use the __pg__ object to create pooled clients, build your own client pool implementation, or use https://github.com/grncdr/any-db. +__pg__ is an _instance_ of __EventEmitter__ which provides a somewhat naive implementation of __[[Client]]__ pooling. It has a function to retrieve __[[Client]]__ instances from a pool of available clients. You can bypass the __pg__ object all together and create __[[Client]]__ objects via their constructor (`new pg.Client()`); however, each __[[Client]]__ represents an open connection to your PostgreSQL server instance, and the initial connection handshake takes many times longer than a single query execution. Also, If you attempt to create and connect more __[[Client]]__ objects than supported connections to your PostgreSQL server you will encounter errors. This becomes especially painful if you manually instantiate a new __[[Client]]__ object per each http request to a web server. Once you receive more simultaneous requests to your web server than your PostgresSQL server can maintain you will be in a bad place...so it's recommended unless you have a particular case, use the __pg__ object to create pooled clients, build your own client pool implementation, or use https://github.com/grncdr/node-any-db. * Methods * [[connect|pg#wiki-method-connect]]