2383 Commits

Author SHA1 Message Date
Brian C
67b880a4bd
Merge pull request #35 from jakobrun/master
return rowCount on insert
2019-01-08 08:52:20 -06:00
Brian M. Carlson
1200da5c74 Fix test 2019-01-08 08:52:05 -06:00
Brian C
0a1052516f
Merge pull request #44 from jafl/redshift-requires-portal-name
fix: AWS Redshift requires a portal name to honor fetchSize
2019-01-08 08:28:39 -06:00
Brian C
73506d36b9
Merge pull request #47 from pistor/remove-pg.js-support
Remove support for deprecated pg.js package
2019-01-08 08:27:07 -06:00
Brian M. Carlson
d7f6ed0c7c Bump version 2019-01-02 12:14:50 -06:00
Brian C
4d2ad36951
Upgrade to test on node 10 (#114)
* Upgrade to test on node 10

* Use errno instead of code

* Only check errno if it exists
2019-01-02 12:11:21 -06:00
Bryan Clement
f91769538d idleListener no longer grabs references to things it doesn't need (#83) 2019-01-02 12:10:42 -06:00
Johannes Würbach
35a285c9a7 Fix two timeout races (#109) 2018-12-14 14:15:35 -06:00
Brian M. Carlson
140f9a1242 Bump version 2018-12-11 12:53:22 -06:00
Charmander
7ef3f4aa4a Fix queued checkout after a connection failure (#111)
* Test queued checkout after a connection failure

Co-authored-by: Johannes Würbach <johannes.wuerbach@googlemail.com>

* Fix queued checkout after a connection failure

Co-authored-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
2018-12-11 12:53:00 -06:00
Mikkel Hoegh
6fc07b4a63
fix: remove support for deprecated pg.js package
BREAKING CHANGE: pg.js is long dead and no longer supported.

Use [pg](https://www.npmjs.com/package/pg) instead.
2018-12-05 00:06:10 +01:00
Brian M. Carlson
060a35faeb Bump version v7.7.1 2018-11-29 09:37:03 -06:00
Brian M. Carlson
93df471d98 Bump min version of pg-pool 2018-11-29 09:36:57 -06:00
Brian M. Carlson
f52a0fe8f7 Bump version v7.7.0 2018-11-29 09:16:05 -06:00
Brian M. Carlson
77866d0264 Update changelog 2018-11-29 09:15:50 -06:00
André Cruz
eb076db5d4 Add configurable query timeout (#1760)
* Add read_timeout to connection settings

* Fix uncaught error issue

* Fix lint

* Fix "queryCallback is not a function"

* Added test and fixed error returning

* Added query timeout to native client

* Added test for timeout not reached

* Ensure error is the correct one
Correct test name

* Removed dubious check

* Added new test

* Improved test
2018-11-29 09:11:47 -06:00
Brian M. Carlson
4b9669eaa7 Bump version 2018-11-12 12:32:19 -06:00
Brian M. Carlson
3620e23899 Bump version v7.6.1 2018-11-07 09:32:45 -06:00
Brian C
daddd4ffd6
Bump buffer-writer version (#1764)
Fixes the deprecation warning for using `new Buffer`.

The change is semver major in buffer-writer since we dropped support for node < 4.x, but otherwise it's a non-breaking change.  Since node-postgres already requires node >= 4.x it's fine.
2018-11-07 09:31:59 -06:00
Brian M. Carlson
a3295b4355 Bump version v7.6.0 2018-10-26 09:03:19 -05:00
Brian M. Carlson
034eb34f3c Update changelog 2018-10-26 09:02:53 -05:00
Brian C
d468b6a1f1
Update SPONSORS.md 2018-10-26 08:59:00 -05:00
Igor Savin
badf0a1c65 Update ESLint (#1753)
* Update ESLint

* Downgrade ESLint version to restore Node 4 support

* Downgrade more dependencies

* Keep downgrading
2018-10-26 08:55:31 -05:00
Charmander
1cf1e05ab9 Allow a custom type to be used for Client promises (#1518)
Matches the Pool API.
2018-10-24 10:40:23 -05:00
Igor Savin
ff6fe1e01e Execute tests on Node 11 in CI (#1752) 2018-10-23 13:02:49 -07:00
John Lindal
37997fed76 fix formatting issues 2018-10-23 09:59:50 -07:00
John Lindal
19c68c753e fix: AWS Redshift requires a portal name to honor fetchSize 2018-10-17 14:30:56 -07:00
Brian M. Carlson
6177ff95a6 Bump version 2018-10-08 12:51:13 -05:00
Brian C
2446fdb8d0
Fix for pg@7.5 (#47)
* Fix for pg@7.5

Don't return anything from `stream.submit`

* Add node@10 to travis version

* Relax version of node@4.x
2018-10-08 12:50:11 -05:00
Brian M. Carlson
04a0ec71b4 Bump version v7.5.0 2018-10-03 10:46:12 -05:00
Brian M. Carlson
8cf5a84539 Update changelog 2018-10-03 10:45:53 -05:00
Charmander
3828aa8608 Queued query errors (#1503)
* Add tests for query callbacks after connection-level errors

* Ensure callbacks are executed for all queued queries after connection-level errors

Separates socket errors from error messages, sends socket errors to all queries in the queue, marks clients as unusable after socket errors.

This is not very pleasant but should maintain backwards compatibility…?

* Always call `handleError` asynchronously

This doesn’t match the original behaviour of the type errors, but it’s correct.

* Fix return value of `Client.prototype.query` in immediate error cases

* Mark clients with closed connections as unusable consistently

* Add tests for error event when connecting Client

* Ensure the promise and callback versions of Client#connect always have the same behaviour

* Give same error to queued queries as to active query when ending

and do so in the native Client as well.

* Restore original ordering between queued query callbacks and 'end' event
2018-10-03 10:37:15 -05:00
Thomas Hunter II
fed6375e0a remove query.stream references
* This hasn't been supported since 0b2344b6b5afbb68e89eff1ef2b57ecf0726d80b
* `node-pg-copy-streams` relies on overriding the `handleCopyInResponse` method:
  * https://github.com/brianc/node-pg-copy-streams/blob/e15feb19/index.js#L53
2018-10-03 10:16:42 -05:00
Pat Gaffney
11a4793452 Add error handling for null params to Client.prototype.query() 2018-10-03 10:15:04 -05:00
Charmander
e7602bc678
Merge pull request #1701 from gajus/issue-1699
refactor: simplify the escapeIdentifier logic
2018-07-30 02:46:22 +00:00
Gajus Kuizinas
00d749cdfa refactor: simplify the escapeIdentifier logic 2018-07-29 21:29:27 +01:00
Charmander
6c840aabb0
Merge pull request #1692 from askmike/patch-1
typo in test: g/provded/provided
2018-07-17 01:29:30 +00:00
Mike van Rossum
9bfd4bff40
[test] g/provded/provided 2018-07-17 01:07:00 +08:00
Charmander
a9b3ef7cd3
Merge pull request #1684 from dominicletz/patch-1
Replace poolSize by max in error test
2018-07-09 16:00:55 +00:00
Dominic Letz
28e66ccd4b
Use pool constructor to pass pool size 2018-07-09 14:19:55 +08:00
Dominic Letz
2ea5f91f4a
Replace poolSize by max in error test 2018-07-09 11:46:56 +08:00
Charmander
1cbd507b8c
Merge pull request #1677 from sehrope/fix-network-partition-test-race
Fix network partition test race
2018-06-25 00:33:34 +00:00
Brian C
91bdbbd3d7
Merge pull request #40 from savvymas/patch-1
Add repo to package.json
2018-06-21 14:13:11 -07:00
Savannah Mastrangelo
7eabfbe0ba
Add repo to package.json
Without this pages like https://www.npmjs.com/package/pg-cursor don't link back correctly.
2018-06-20 12:29:41 -04:00
Sehrope Sarkuni
2dc5c6864b Change network partition test to wait for client socket creation prior to destroy 2018-06-17 11:58:37 -04:00
Brian M. Carlson
3ac356a812 Bump version v7.4.3 2018-05-07 10:07:10 -05:00
Matt Keas
7de137f9f8 tls.connect({checkServerIdentity}) option cannot be a null - must be a method or not exist.
Defaults to built-in `tls.checkServerIdentity` method in the event one is not passed into `pgConfig.ssl`

Found breaking in v9.4.2 vs v9.4.1 a la 49054717b4ec0c6d477f04c2becd1f9680b2d13a

cc @tobio @brianc
2018-05-07 10:05:56 -05:00
Brian M. Carlson
83ede28e18 Bump version v7.4.2 2018-05-04 14:01:26 -05:00
Yuval Greenfield
277dc508da Clarifying pool connect logging (#73)
Existing log code was outputting 'connecting new client' twice and saying 'new client connected', creating a false impression when an error (like a timeout) was present.
2018-05-04 13:06:49 -05:00
Yuval Greenfield
6b2883d290 terminiated -> terminated (#78) 2018-05-04 13:06:32 -05:00