UNPKG

4.08 kBMarkdownView Raw
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<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>
5<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>
6
7Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings.
8
9## Install
10
11```sh
12$ npm install pg
13```
14
15---
16
17## :star: [Documentation](https://node-postgres.com) :star:
18
19### Features
20
21- Pure JavaScript client and native libpq bindings share _the same API_
22- Connection pooling
23- Extensible JS ↔ PostgreSQL data-type coercion
24- Supported PostgreSQL features
25 - Parameterized queries
26 - Named statements with query plan caching
27 - Async notifications with `LISTEN/NOTIFY`
28 - Bulk import & export with `COPY TO/COPY FROM`
29
30### Extras
31
32node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture.
33The entire list can be found on our [wiki](https://github.com/brianc/node-postgres/wiki/Extras).
34
35## Support
36
37node-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!
38
39When you open an issue please provide:
40
41- version of Node
42- version of Postgres
43- smallest possible snippet of code to reproduce the problem
44
45You 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.
46
47## Sponsorship :two_hearts:
48
49node-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).
50
51If 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.
52
53## Contributing
54
55**:heart: contributions!**
56
57I will **happily** accept your pull request if it:
58
59- **has tests**
60- looks reasonable
61- does not break backwards compatibility
62
63If 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.
64
65## Troubleshooting and FAQ
66
67The causes and solutions to common errors can be found among the [Frequently Asked Questions (FAQ)](https://github.com/brianc/node-postgres/wiki/FAQ)
68
69## License
70
71Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com)
72
73Permission is hereby granted, free of charge, to any person obtaining a copy
74of this software and associated documentation files (the "Software"), to deal
75in the Software without restriction, including without limitation the rights
76to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77copies of the Software, and to permit persons to whom the Software is
78furnished to do so, subject to the following conditions:
79
80The above copyright notice and this permission notice shall be included in
81all copies or substantial portions of the Software.
82
83THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
84IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
85FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
86AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
87LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
88OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
89THE SOFTWARE.