Skip to content

Commit 77866d0

Browse files
committed
Update changelog
1 parent eb076db commit 77866d0

File tree

1 file changed

+53
-24
lines changed

1 file changed

+53
-24
lines changed

CHANGELOG.md

+53-24
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ For richer information consult the commit log on github with referenced pull req
44

55
We do not include break-fix version release in this file.
66

7+
### 7.7.0
8+
9+
- Add support for configurable [query timeout](https://github.com/brianc/node-postgres/pull/1760) on a client level.
10+
711
### 7.6.0
12+
813
- Add support for ["bring your own promise"](https://github.com/brianc/node-postgres/pull/1518)
914

1015
### 7.5.0
@@ -56,16 +61,17 @@ We do not include break-fix version release in this file.
5661

5762
### v6.1.0
5863

59-
- Add optional callback parameter to the pure JavaScript `client.end` method. The native client already supported this.
64+
- Add optional callback parameter to the pure JavaScript `client.end` method. The native client already supported this.
6065

6166
### v6.0.0
6267

6368
#### Breaking Changes
64-
- 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...
69+
70+
- 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...
6571

6672
#### New features
6773

68-
- 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.
74+
- 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.
6975

7076
You can now create an instance of a pool and don't have to rely on the `pg` singleton for anything:
7177

@@ -82,68 +88,79 @@ pool.connect(function(err, client, done) {
8288

8389
Promise support & other goodness lives now in [pg-pool](https://github.com/brianc/node-pg-pool).
8490

85-
__Please__ read the readme at [pg-pool](https://github.com/brianc/node-pg-pool) for the full api.
91+
**Please** read the readme at [pg-pool](https://github.com/brianc/node-pg-pool) for the full api.
8692

87-
- Included support for tcp keep alive. Enable it as follows:
93+
- Included support for tcp keep alive. Enable it as follows:
8894

8995
```js
90-
var client = new Client({ keepAlive: true })
96+
var client = new Client({ keepAlive: true });
9197
```
9298

9399
This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them.
94100

95-
96101
### v5.1.0
102+
97103
- 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.
98104

99105
Example:
106+
100107
```js
101-
var client = new Client()
102-
client.connect()
103-
client.query('SELECT $1::text as name', ['brianc'])
104-
.then(function(res) {
105-
console.log('hello from', res.rows[0])
106-
client.end()
107-
})
108+
var client = new Client();
109+
client.connect();
110+
client.query("SELECT $1::text as name", ["brianc"]).then(function(res) {
111+
console.log("hello from", res.rows[0]);
112+
client.end();
113+
});
108114
```
109115

110116
### v5.0.0
111117

112118
#### Breaking Changes
119+
113120
- `require('pg').native` now returns null if the native bindings cannot be found; previously, this threw an exception.
114121

115122
#### New Features
123+
116124
- better error message when passing `undefined` as a query parameter
117125
- support for `defaults.connectionString`
118126
- support for `returnToHead` being passed to [generic pool](https://github.com/coopernurse/node-pool)
119127

120128
### v4.5.0
129+
121130
- Add option to parse JS date objects in query parameters as [UTC](https://github.com/brianc/node-postgres/pull/943)
122131

123132
### v4.4.0
133+
124134
- Warn to `stderr` if a named query exceeds 63 characters which is the max length supported by postgres.
125135

126136
### v4.3.0
137+
127138
- Unpin `pg-types` semver. Allow it to float against `pg-types@1.x`.
128139

129140
### v4.2.0
141+
130142
- Support for additional error fields in postgres >= 9.3 if available.
131143

132144
### v4.1.0
145+
133146
- Allow type parser overrides on a [per-client basis](https://github.com/brianc/node-postgres/pull/679)
134147

135148
### v4.0.0
149+
136150
- Make [native bindings](https://github.com/brianc/node-pg-native.git) an optional install with `npm install pg-native`
137151
- No longer surround query result callback with `try/catch` block.
138152
- Remove built in COPY IN / COPY OUT support - better implementations provided by [pg-copy-streams](https://github.com/brianc/node-pg-copy-streams.git) and [pg-native](https://github.com/brianc/node-pg-native.git)
139153

140154
### v3.6.0
155+
141156
- Include support for (parsing JSONB)[https://github.com/brianc/node-pg-types/pull/13] (supported in postgres 9.4)
142157

143158
### v3.5.0
159+
144160
- Include support for parsing boolean arrays
145161

146162
### v3.4.0
163+
147164
- Include port as connection parameter to [unix sockets](https://github.com/brianc/node-postgres/pull/604)
148165
- Better support for odd [date parsing](https://github.com/brianc/node-pg-types/pull/8)
149166

@@ -153,7 +170,6 @@ client.query('SELECT $1::text as name', ['brianc'])
153170
- Expose array parsers on [pg.types](https://github.com/brianc/node-pg-types/pull/2)
154171
- Allow [pool](https://github.com/brianc/node-postgres/pull/591) to be configured
155172

156-
157173
### v3.1.0
158174

159175
- Add [count of the number of times a client has been checked out from the pool](https://github.com/brianc/node-postgres/pull/556)
@@ -162,27 +178,29 @@ client.query('SELECT $1::text as name', ['brianc'])
162178
### v3.0.0
163179

164180
#### Breaking changes
181+
165182
- [Parse the DATE PostgreSQL type as local time](https://github.com/brianc/node-postgres/pull/514)
166183

167-
After [some discussion](https://github.com/brianc/node-postgres/issues/510) it was decided node-postgres was non-compliant in how it was handling DATE results. They were being converted to UTC, but the PostgreSQL documentation specifies they should be returned in the client timezone. This is a breaking change, and if you use the `date` type you might want to examine your code and make sure nothing is impacted.
184+
After [some discussion](https://github.com/brianc/node-postgres/issues/510) it was decided node-postgres was non-compliant in how it was handling DATE results. They were being converted to UTC, but the PostgreSQL documentation specifies they should be returned in the client timezone. This is a breaking change, and if you use the `date` type you might want to examine your code and make sure nothing is impacted.
168185

169186
- [Fix possible numeric precision loss on numeric & int8 arrays](https://github.com/brianc/node-postgres/pull/501)
170187

171-
pg@v2.0 included changes to not convert large integers into their JavaScript number representation because of possibility for numeric precision loss. The same types in arrays were not taken into account. This fix applies the same type of type-coercion rules to arrays of those types, so there will be no more possible numeric loss on an array of very large int8s for example. This is a breaking change because now a return type from a query of `int8[]` will contain _string_ representations
172-
of the integers. Use your favorite JavaScript bignum module to represent them without precision loss, or punch over the type converter to return the old style arrays again.
188+
pg@v2.0 included changes to not convert large integers into their JavaScript number representation because of possibility for numeric precision loss. The same types in arrays were not taken into account. This fix applies the same type of type-coercion rules to arrays of those types, so there will be no more possible numeric loss on an array of very large int8s for example. This is a breaking change because now a return type from a query of `int8[]` will contain _string_ representations
189+
of the integers. Use your favorite JavaScript bignum module to represent them without precision loss, or punch over the type converter to return the old style arrays again.
173190

174191
- [Fix to input array of dates being improperly converted to utc](https://github.com/benesch/node-postgres/commit/c41eedc3e01e5527a3d5c242fa1896f02ef0b261#diff-7172adb1fec2457a2700ed29008a8e0aR108)
175192

176-
Single `date` parameters were properly sent to the PostgreSQL server properly in local time, but an input array of dates was being changed into utc dates. This is a violation of what PostgreSQL expects. Small breaking change, but none-the-less something you should check out if you are inserting an array of dates.
193+
Single `date` parameters were properly sent to the PostgreSQL server properly in local time, but an input array of dates was being changed into utc dates. This is a violation of what PostgreSQL expects. Small breaking change, but none-the-less something you should check out if you are inserting an array of dates.
177194

178195
- [Query no longer emits `end` event if it ends due to an error](https://github.com/brianc/node-postgres/commit/357b64d70431ec5ca721eb45a63b082c18e6ffa3)
179196

180-
This is a small change to bring the semantics of query more in line with other EventEmitters. The tests all passed after this change, but I suppose it could still be a breaking change in certain use cases. If you are doing clever things with the `end` and `error` events of a query object you might want to check to make sure its still behaving normally, though it is most likely not an issue.
197+
This is a small change to bring the semantics of query more in line with other EventEmitters. The tests all passed after this change, but I suppose it could still be a breaking change in certain use cases. If you are doing clever things with the `end` and `error` events of a query object you might want to check to make sure its still behaving normally, though it is most likely not an issue.
181198

182199
#### New features
200+
183201
- [Supercharge `prepareValue`](https://github.com/brianc/node-postgres/pull/555)
184202

185-
The long & short of it is now any object you supply in the list of query values will be inspected for a `.toPostgres` method. If the method is present it will be called and its result used as the raw text value sent to PostgreSQL for that value. This allows the same type of custom type coercion on query parameters as was previously afforded to query result values.
203+
The long & short of it is now any object you supply in the list of query values will be inspected for a `.toPostgres` method. If the method is present it will be called and its result used as the raw text value sent to PostgreSQL for that value. This allows the same type of custom type coercion on query parameters as was previously afforded to query result values.
186204

187205
- [Domain aware connection pool](https://github.com/brianc/node-postgres/pull/531)
188206

@@ -197,41 +215,52 @@ Avoids a scenario where your pool could fill up with disconnected & unusable cli
197215
To provide better documentation and a clearer explanation of how to override the query result parsing system we broke the type converters [into their own module](https://github.com/brianc/node-pg-types). There is still work around removing the 'global-ness' of the type converters so each query or connection can return types differently, but this is a good first step and allow a lot more obvious way to return int8 results as JavaScript numbers, for example
198216

199217
### v2.11.0
218+
200219
- Add support for [application_name](https://github.com/brianc/node-postgres/pull/497)
201220

202221
### v2.10.0
222+
203223
- Add support for [the password file](http://www.postgresql.org/docs/9.3/static/libpq-pgpass.html)
204224

205225
### v2.9.0
226+
206227
- Add better support for [unix domain socket](https://github.com/brianc/node-postgres/pull/487) connections
207228

208229
### v2.8.0
230+
209231
- Add support for parsing JSON[] and UUID[] result types
210232

211233
### v2.7.0
234+
212235
- Use single row mode in native bindings when available [@rpedela]
213236
- reduces memory consumption when handling row values in 'row' event
214237
- Automatically bind buffer type parameters as binary [@eugeneware]
215238

216239
### v2.6.0
240+
217241
- Respect PGSSLMODE environment variable
218242

219243
### v2.5.0
244+
220245
- Ability to opt-in to int8 parsing via `pg.defaults.parseInt8 = true`
221246

222247
### v2.4.0
248+
223249
- Use eval in the result set parser to increase performance
224250

225251
### v2.3.0
252+
226253
- Remove built-in support for binary Int64 parsing.
227-
_Due to the low usage & required compiled dependency this will be pushed into a 3rd party add-on_
254+
_Due to the low usage & required compiled dependency this will be pushed into a 3rd party add-on_
228255

229256
### v2.2.0
257+
230258
- [Add support for excapeLiteral and escapeIdentifier in both JavaScript and the native bindings](https://github.com/brianc/node-postgres/pull/396)
231259

232260
### v2.1.0
261+
233262
- Add support for SSL connections in JavaScript driver
234-
- this means you can connect to heroku postgres from your local machine without the native bindings!
263+
- this means you can connect to heroku postgres from your local machine without the native bindings!
235264
- [Add field metadata to result object](https://github.com/brianc/node-postgres/blob/master/test/integration/client/row-description-on-results-tests.js)
236265
- [Add ability for rows to be returned as arrays instead of objects](https://github.com/brianc/node-postgres/blob/master/test/integration/client/results-as-array-tests.js)
237266

@@ -267,7 +296,7 @@ If you are unhappy with these changes you can always [override the built in type
267296
### v1.0.0
268297

269298
- remove deprecated functionality
270-
- Callback function passed to `pg.connect` now __requires__ 3 arguments
299+
- Callback function passed to `pg.connect` now **requires** 3 arguments
271300
- Client#pauseDrain() / Client#resumeDrain removed
272301
- numeric, decimal, and float data types no longer parsed into float before being returned. Will be returned from query results as `String`
273302

0 commit comments

Comments
 (0)