1 | # node-postgres
|
2 |
|
3 | [![Build Status](https://secure.travis-ci.org/brianc/node-postgres.svg?branch=master)](http://travis-ci.org/brianc/node-postgres)
|
4 | [![Dependency Status](https://david-dm.org/brianc/node-postgres.svg?path=packages/pg)](https://david-dm.org/brianc/node-postgres?path=packages/pg)
|
5 | <span class="badge-npmversion"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/v/pg.svg" alt="NPM version" /></a></span>
|
6 | <span class="badge-npmdownloads"><a href="https://npmjs.org/package/pg" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/pg.svg" alt="NPM downloads" /></a></span>
|
7 |
|
8 | Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings.
|
9 |
|
10 | ## Install
|
11 |
|
12 | ```sh
|
13 | $ npm install pg
|
14 | ```
|
15 |
|
16 | ---
|
17 |
|
18 | ## :star: [Documentation](https://node-postgres.com) :star:
|
19 |
|
20 | ### Features
|
21 |
|
22 | - Pure JavaScript client and native libpq bindings share _the same API_
|
23 | - Connection pooling
|
24 | - Extensible JS ↔ PostgreSQL data-type coercion
|
25 | - Supported PostgreSQL features
|
26 | - Parameterized queries
|
27 | - Named statements with query plan caching
|
28 | - Async notifications with `LISTEN/NOTIFY`
|
29 | - Bulk import & export with `COPY TO/COPY FROM`
|
30 |
|
31 | ### Extras
|
32 |
|
33 | node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture.
|
34 | The entire list can be found on our [wiki](https://github.com/brianc/node-postgres/wiki/Extras).
|
35 |
|
36 | ## Support
|
37 |
|
38 | node-postgres is free software. If you encounter a bug with the library please open an issue on the [GitHub repo](https://github.com/brianc/node-postgres). If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better!
|
39 |
|
40 | When you open an issue please provide:
|
41 |
|
42 | - version of Node
|
43 | - version of Postgres
|
44 | - smallest possible snippet of code to reproduce the problem
|
45 |
|
46 | You can also follow me [@briancarlson](https://twitter.com/briancarlson) if that's your thing. I try to always announce noteworthy changes & developments with node-postgres on Twitter.
|
47 |
|
48 | ## Sponsorship :two_hearts:
|
49 |
|
50 | node-postgres's continued development has been made possible in part by generous finanical support from [the community](https://github.com/brianc/node-postgres/blob/master/SPONSORS.md) and these featured sponsors:
|
51 |
|
52 | <div align="center">
|
53 | <a href="https://crate.io" target="_blank">
|
54 | <img height="80" src="https://node-postgres.com/crate-io.png" />
|
55 | </a>
|
56 | </div>
|
57 |
|
58 | If you or your company are benefiting from node-postgres and would like to help keep the project financially sustainable [please consider supporting](https://github.com/sponsors/brianc) its development.
|
59 |
|
60 | ## Contributing
|
61 |
|
62 | **:heart: contributions!**
|
63 |
|
64 | I will **happily** accept your pull request if it:
|
65 |
|
66 | - **has tests**
|
67 | - looks reasonable
|
68 | - does not break backwards compatibility
|
69 |
|
70 | If your change involves breaking backwards compatibility please please point that out in the pull request & we can discuss & plan when and how to release it and what type of documentation or communicate it will require.
|
71 |
|
72 | ## Troubleshooting and FAQ
|
73 |
|
74 | The causes and solutions to common errors can be found among the [Frequently Asked Questions (FAQ)](https://github.com/brianc/node-postgres/wiki/FAQ)
|
75 |
|
76 | ## License
|
77 |
|
78 | Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com)
|
79 |
|
80 | Permission is hereby granted, free of charge, to any person obtaining a copy
|
81 | of this software and associated documentation files (the "Software"), to deal
|
82 | in the Software without restriction, including without limitation the rights
|
83 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
84 | copies of the Software, and to permit persons to whom the Software is
|
85 | furnished to do so, subject to the following conditions:
|
86 |
|
87 | The above copyright notice and this permission notice shall be included in
|
88 | all copies or substantial portions of the Software.
|
89 |
|
90 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
91 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
92 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
93 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
94 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
95 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
96 | THE SOFTWARE.
|