1915 Commits

Author SHA1 Message Date
Brian M. Carlson
697bdae507 Update changelog 2019-05-10 12:12:02 -05:00
Peter Boromissza
0993e4b61a Added the missing connect_timeout and keepalives_idle config parameters (#1847)
* Added the missing connect_timeout and keepalives_idle config parameters

* Implementation and tests for keepAliveInitialDelayMillis and connectionTimeoutMillis [squashed 4]
2019-05-10 11:48:38 -05:00
Brian M. Carlson
4b530a9e0f Bump version v7.10.0 2019-04-16 17:35:20 -05:00
Brian M. Carlson
0f50d92ea6 Update changelog 2019-04-16 17:35:08 -05:00
Sehrope Sarkuni
13c14f1de0 fix: Catch and emit query parameter prepareValue(...) errors (#1855)
Adds a try/catch block around the prepareValue(...) invocations in query.prepare(...)
to ensure that any that throw an error are caught and bubbled up to the caller.
2019-04-16 17:29:40 -05:00
Tony Wooster
566058de17 Add support for per per-query types (#1825)
The documentation states that you can pass custom type processors to
query objects. See:

https://node-postgres.com/features/queries#types

This didn't actually work. This commit adds an initial implementation
of per-query type-parsing. Caveats:

* It does not work with pg-native. That would require a separate pull
  request to pg-native, and a rather significant change to how that
  library handles query results.

* Per-query types do not "inherit" from types assigned to the Client,
  ala TypeOverrides.
2019-04-16 17:27:39 -05:00
Malcolm
43ebcfb6bc Fix input preparation for date objects with a BC year (#1864)
* test: BC date input preparation

* Fix input preparation for BC dates
2019-04-15 18:38:20 -05:00
Malcolm
4d84909cbd Fix integration test for v1.0.4 of postgres-date sub-dependency (#1867) 2019-04-15 18:37:33 -05:00
Brian M. Carlson
6b8176e841 Bump version v7.9.0 2019-03-15 13:42:56 -05:00
Brian M. Carlson
b12881209b Update CHANGELOG.md 2019-03-15 13:42:24 -05:00
Brian M. Carlson
9cf3d32467 Update SPONSORS.md 2019-03-15 13:42:04 -05:00
andreme
5a92ba3701 sasl/scram authentication (#1835) 2019-03-07 11:02:21 -06:00
Rhys Arkins
41706e64d4 chore: don't publish Travis to npm (#1851) 2019-03-07 10:37:14 -06:00
Brian M. Carlson
bae9fd734a Bump version v7.8.2 2019-03-07 08:58:13 -06:00
Rich Harris
e6a878cbb5 compare prepared statement text with previous to prevent incorrect queries (#1814)
* compare prepared statement text with previous to prevent incorrect queries - fixes #1813

* make suggested changes to error message
2019-03-06 09:35:30 -06:00
Ben Holden-Crowther
4c6c0e9b77 Update license date in readme (#1823) 2019-03-06 09:34:06 -06:00
Brian M. Carlson
e0ebdeff88 Bump version v7.8.1 2019-02-20 14:36:50 -06:00
Brian C
bf84db7c22
Bump packet-reader version (#1840)
* Bump packet-reader version

This should fix the deprecation warning from using `new Buffer`.

* Remove node 11 tests - its a non-stable (odd) version
2019-02-20 14:36:27 -06:00
Brian M. Carlson
fcd0f02210 Bump version v7.8.0 2019-01-11 08:32:29 -06:00
Brian M. Carlson
00123861fb Update changelog 2019-01-11 08:32:23 -06:00
Brian M. Carlson
896faa56f7 Update SPONSORS.md 2019-01-11 08:30:37 -06:00
Ben Holden-Crowther
c8f2f23845 Update license date (#1800)
From 2018 to 2019
2019-01-11 08:16:54 -06:00
Ben Drucker
0e11b5c781 deps: update pg-types to 2 (#1806)
drops node < 4 support but pg previously did so (not major)
2019-01-11 08:16:29 -06:00
Gregory Lepsky
ccbccc9716 Issue #1769 - Inability to restrict communication protocols to set in ssl configuration (#1804)
- Propagate client's ssl.secureOptions config to TLS.
2019-01-08 09:08:43 -06: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
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
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