You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-25
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,12 @@ PostgreSQL client for node.js. Pure JavaScript and native libpq bindings.
8
8
9
9
npm install pg
10
10
11
-
### Windows
12
-
13
-
1. Install Visual Studio C++ (successfully built with Express 2010). Express is free.
14
-
2. Add your Postgre Installation's `bin` folder to the system path (i.e. `C:\Program Files\PostgreSQL\9.3\bin`).
15
-
3. Make sure that both `libpq.dll` and `pg_config.exe` are in that folder.
16
-
4.`npm install pg`
17
11
18
12
## Examples
19
13
20
14
### Client pooling
21
15
22
-
Typically you will access the PostgreSQL server through a pool of clients. node-postgres ships with a built in pool to help get you up and running quickly.
16
+
Generally you will access the PostgreSQL server through a pool of clients. A client takes a non-trivial amount of time to establish a new connection. A client also consumes a non-trivial amount of resources on the PostgreSQL server - not something you want to do on every http request. Good news: node-postgres ships with built in client pooling.
node-postgres contains a pure JavaScript driver and also exposes JavaScript bindings to libpq. You can use either interface. I personally use the JavaScript bindings as they are quite fast, and I like having everything implemented in JavaScript.
74
+
node-postgres contains a pure JavaScript driver and also exposes JavaScript bindings via libpq. You can use either interface. I personally use the JavaScript bindings as they are quite fast, and I like having everything implemented in JavaScript.
83
75
84
76
To use native libpq bindings replace `require('pg')` with `require('pg').native`. If you __do not__ need or want the native bindings at all, consider using [node-postgres-pure](https://github.com/brianc/node-postgres-pure) instead which does not include them.
85
77
@@ -103,7 +95,7 @@ __I love contributions.__
103
95
You are welcome contribute via pull requests. If you need help getting the tests running locally feel free to email me or gchat me.
104
96
105
97
I will __happily__ accept your pull request if it:
106
-
-_has tests_
98
+
-_)has tests__
107
99
- looks reasonable
108
100
- does not break backwards compatibility
109
101
- satisfies jshint
@@ -132,6 +124,7 @@ Follow me [@briancarlson](https://twitter.com/briancarlson) to keep up to date.
132
124
133
125
node-postgres is by design _low level_ with the bare minimum of abstraction. These might help out:
134
126
127
+
-[brianc/node-pg-native](https://github.com/brianc/node-pg-native) - Simple interface abstraction on top of [libpq](https://github.com/brianc/node-libpq)
135
128
-[brianc/node-pg-query-stream](https://github.com/brianc/node-pg-query-stream) - Query results from node-postgres as a readable (object) stream
136
129
-[brianc/node-pg-cursor](https://github.com/brianc/node-pg-cursor) - Query cursor extension for node-postgres
137
130
-[brianc/node-pg-copy-streams](https://github.com/brianc/node-pg-copy-streams) - COPY FROM / COPY TO for node-postgres. Stream from one database to another, and stuff.
@@ -144,17 +137,12 @@ node-postgres is by design _low level_ with the bare minimum of abstraction. Th
0 commit comments