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: CHANGELOG.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,75 @@ For richer information consult the commit log on github with referenced pull req
4
4
5
5
We do not include break-fix version release in this file.
6
6
7
+
### v6.1.0
8
+
9
+
- Add optional callback parameter to the pure JavaScript `client.end` method. The native client already supported this.
10
+
11
+
### v6.0.0
12
+
13
+
#### Breaking Changes
14
+
- Remove `pg.pools`. There is still a reference kept to the pools created & tracked by `pg.connect` but it has been renamed, is considered private, and should not be used. Accessing this API directly was uncommon and was _supposed_ to be private but was incorrectly documented on the wiki. Therefore, it is a breaking change of an (unintentionally) public interface to remove it by renaming it & making it private. Eventually `pg.connect` itself will be deprecated in favor of instantiating pools directly via `new pg.Pool()` so this property should become completely moot at some point. In the mean time...check out the new features...
15
+
16
+
#### New features
17
+
18
+
- Replace internal pooling code with [pg-pool](https://github.com/brianc/node-pg-pool). This is the first step in eventually deprecating and removing the singleton `pg.connect`. The pg-pool constructor is exported from node-postgres at `require('pg').Pool`. It provides a backwards compatible interface with `pg.connect` as well as a promise based interface & additional niceties.
19
+
20
+
You can now create an instance of a pool and don't have to rely on the `pg` singleton for anything:
21
+
22
+
```
23
+
var pg = require('pg')
24
+
25
+
var pool = new pg.Pool()
26
+
27
+
// your friendly neighboorhood pool interface, without the singleton
28
+
pool.connect(function(err, client, done) {
29
+
// ...
30
+
})
31
+
```
32
+
33
+
Promise support & other goodness lives now in [pg-pool](https://github.com/brianc/node-pg-pool).
34
+
35
+
__Please__ read the readme at [pg-pool](https://github.com/brianc/node-pg-pool) for the full api.
36
+
37
+
- Included support for tcp keep alive. Enable it as follows:
38
+
39
+
```js
40
+
var client =newClient({ keepAlive:true })
41
+
```
42
+
43
+
This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them.
44
+
45
+
46
+
### v5.1.0
47
+
- Make the query object returned from `client.query` implement the promise interface. This is the first step towards promisifying more of the node-postgres api.
48
+
49
+
Example:
50
+
```js
51
+
var client =newClient()
52
+
client.connect()
53
+
client.query('SELECT $1::text as name', ['brianc'])
54
+
.then(function(res) {
55
+
console.log('hello from', res.rows[0])
56
+
client.end()
57
+
})
58
+
```
59
+
60
+
### v5.0.0
61
+
62
+
#### Breaking Changes
63
+
-`require('pg').native` now returns null if the native bindings cannot be found; previously, this threw an exception.
64
+
65
+
#### New Features
66
+
- better error message when passing `undefined` as a query parameter
67
+
- support for `defaults.connectionString`
68
+
- support for `returnToHead` being passed to [generic pool](https://github.com/coopernurse/node-pool)
69
+
70
+
### v4.5.0
71
+
- Add option to parse JS date objects in query parameters as [UTC](https://github.com/brianc/node-postgres/pull/943)
72
+
73
+
### v4.4.0
74
+
- Warn to `stderr` if a named query exceeds 63 characters which is the max lenght supported by postgres.
75
+
7
76
### v4.3.0
8
77
- Unpin `pg-types` semver. Allow it to float against `[email protected]`.
0 commit comments