* Warn when pg.Pool() isn’t called as a constructor
in preparation for #1541. `eval` is a bit awkward, but it’s more accurate than an `instanceof` check and will work on platforms new enough to support pg 8 (i.e. only not Node 4).
* Warn when Query() isn’t called as a constructor
The message is created with a fixed name.
56b7c4168d5aa084b2821279ee88d437a2b7636d, released in pg 2.4.0, was when this became applicable and the type of a `notice` event’s argument changed to an Error.
* Exit with error code when create-test-tables fails
* Add PostgreSQL 10 to CI
and change to Ubuntu 18.04 so building OpenSSL isn’t necessary, and move old PostgreSQL version tests to the latest Node LTS.
* Add Node 13 to CI
* Preserve create-test-tables’s compatibility with PostgreSQL <9.4
* Require latest pg-pool ^2.0.7
to limit variability of next pg’s installations.
* Ignore EPIPE when writing termination message
I don’t know why this wasn’t necessary for tests to pass before…
* Fix disconnection tests for pg-pool 2.0.7
In pg-pool 2.0.7, checked-out clients became responsible for their own 'error' events.
brianc/node-pg-pool#123
* Bump version of pg-cursor
This includes fixes in pg-cursor@2.0.1. I've relaxed semver a touch so I don't have to release a new version here just for patch changes to pg-cursor.
* Pass options to pg-cursor
fixes#55
When code was added to use a random named portal instead of the empty portal to support redshift we didn't update the close messages approprately. This could result in postgres keeping locks on tables for modification if streaming and table modification was both done within a transaction. This update fixes the issue by always issuing a close command on the named portal when query is finished.
fixes#56
* Upgrade dependencies
- There was a security vuln with mocha, so upgraded mocha.
- Upgraded versions of node we're going to check in travis
- Switched to yarn from npm
- Removed --no-exit as that's standard mocha behavior now
* Enable postgres on newer version of travis
There are no tests covering cursor.end(). It's also a weird method to have on the cursor as it terminates the connection to postgres internally. I don't recall why I added this method in the first place but its not correct to close a connection to postgres by calling .end on a cursor...seems like a pretty big footgun. If you have a pooled client and you call `cursor.end` it'll close the client internally and likely confuse the pool. Plus it's just weird to be able to close a connection by calling .end on a query or cursor. So...I'm deprecating that method.
The throwOnRelease() function does not appear to be exposed anywhere,
and it does not appear to make any sense to have it as a standalone func,
as it ovecomplicates things and makes function call as non-returning. Inlined it.