2777 Commits

Author SHA1 Message Date
Brian M. Carlson
29877530c6 Publish
- pg-cursor@2.1.6
 - pg-query-stream@3.0.3
 - pg@7.18.2
pg-cursor@2.1.6 pg-query-stream@3.0.3 pg@7.18.2
2020-02-20 10:33:37 -06:00
Brian M. Carlson
069c2e4ba7 Update sponsors 2020-02-20 10:32:38 -06:00
Kyle Lilly
c2f4b284b1
Implement handleEmptyQuery for pg-query-stream. (#2106) 2020-02-19 12:12:46 -06:00
Herman J. Radtke III
4356679356
Merge pull request #36 from djmitche/format-docs
Include documentation on the URL format in the README
2020-02-17 09:34:43 -08:00
Dustin J. Mitchell
b4e0ba329a Include documentation on the URL format in the README
This summarizes the common forms, but omits some of the more particular,
and unnecessary forms, such as specifying UNIX domain sockets with
`pg://` URLs.
2020-02-16 12:30:46 -05:00
Michal Brašna
823153138f
Destroy socket when there was an error on it (#1975)
When error happens on socket, potentially dead socket is kept open indefinitely by calling "connection.end()".
Similar issue is that it keeps socket open until long-running query is finished even though the connection was ended.
2020-02-14 08:23:41 -08:00
Karl Becker
e404dd517e
Little typo fix, and add GitHub Sponsors (#2104)
Since I believe GitHub Sponsors is your preferred way to donate now, maybe you want to totally get rid of the mention of Patreon, or mention that GitHub Sponsors is preferred?
2020-02-13 11:13:46 -08:00
Herman J. Radtke III
9b89828fac
Merge pull request #34 from danielrozenberg/support-other-socket-modes
Support more modes to set the host as a socket
2020-02-01 08:33:42 -08:00
Brian M. Carlson
b3f0728a11 Publish
- pg-cursor@2.1.5
 - pg-query-stream@3.0.2
 - pg@7.18.1
pg-cursor@2.1.5 pg-query-stream@3.0.2 pg@7.18.1
2020-01-29 18:20:42 -06:00
Brian C
5be3d95f62
Remove double-send of ssl request packet (#2086)
* Remove double-send of ssl request packet

I missed the fact that we are already sending this.  Since I don't have good test coverage for ssl [which I am planning on fixing next](https://github.com/brianc/node-postgres/issues/2009) this got missed.

I'm forcing an SSL test on travis.  This will break for me locally as I don't have SSL enabled on my local test DB. Something I will also remedy.
2020-01-29 18:10:23 -06:00
Brian M. Carlson
c0df3b3e95 Update changelog 2020-01-29 10:53:59 -06:00
Brian M. Carlson
d9fcda8cf7 Publish
- pg-cursor@2.1.4
 - pg-pool@2.0.10
 - pg-query-stream@3.0.1
 - pg@7.18.0
pg-cursor@2.1.4 pg-pool@2.0.10 pg-query-stream@3.0.1 pg@7.18.0
2020-01-29 10:48:38 -06:00
Brian M. Carlson
717ffd0e70 Update ignores 2020-01-29 10:46:03 -06:00
Brian C
11ab1daadd
Close connection on SSL connection errors (#2082)
* Close connection on SSL connection errors

Fixes #2079

* Fix test

* Remove console.log

* Fix tests, implement same behavior for native client

* Fix tests
2020-01-29 10:18:20 -06:00
Daniel Rozenberg
7ec9b70180 Use regex instead of startsWith which is unsupported in node 0.10 2020-01-28 19:40:51 -05:00
Daniel Rozenberg
b309db074f Support URL-encoded socket names 2020-01-28 19:29:38 -05:00
Daniel Rozenberg
0ff40e733b host= query param takes precedence 2020-01-28 19:28:45 -05:00
Brian C
727f1a0ee3
Do not return broken clients to the pool (#2083)
* Prevent requeuing a broken client

If a client is not queryable, the pool should prevent requeuing instead
of strictly enforcing errors to be propagated back to it.

* Write tests for change

* Use node 13.6 in travis

Some weird behavior changed w/ async iteration in node 13.7...I'm not sure if this was an unintentional break or not but it definitely diverges in behavior from node 12 and earlier versions in node 13...so for now going to run tests on 13.6 to unblock the tests from running while I track this down.

* Update packages/pg-pool/test/releasing-clients.js

Co-Authored-By: Charmander <~@charmander.me>

* Update .travis.yml

Co-authored-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
Co-authored-by: Charmander <~@charmander.me>
2020-01-28 10:53:29 -06:00
Charmander
3f6760c62e Update copyright years
because someone will make a PR otherwise. No, this isn’t actually necessary.
2020-01-15 15:44:08 -08:00
Charmander
ee8d32f97c Deprecate implicit TLS rejectUnauthorized: false (#2075)
Yes, it treats `undefined` as `false`. Discussion in #2009. Introduced unintentionally in pg 0.8.7.
2020-01-15 14:59:26 -06:00
Daniel Hritzkiv
d456f1cda0 Update package.json (#2074)
Change the homepage URL's scheme to https
2020-01-14 08:00:55 -08:00
Charmander
ae3f13fad6 Fix tests skipped because of missing suffixes (#2071)
* Fix tests skipped because of missing suffixes

Mocha will happen eventually!

* Skip password tests when they can’t work

Will be made more visible when tests are ported to Mocha.

* Add testing with a user with a password to CI

Should reveal a bug in the password enumerability work, I think.

* Explain new CI matrix entry for password authentication

[ci skip]
2020-01-13 13:00:01 -06:00
Brian M. Carlson
5cf8f5f8d7 Publish
- pg-cursor@2.1.3
 - pg-query-stream@3.0.0
 - pg@7.17.1
pg-cursor@2.1.3 pg-query-stream@3.0.0 pg@7.17.1
2020-01-10 09:22:00 -06:00
Charmander
a046a5a4a5 Fix typo in changelog 2020-01-09 22:40:22 -08:00
Brian C
0895460046
pg-query-stream@3.0 release (#2059)
* Fix one unintentional possible breaking change & update readme

* Update changelog more

* Update CHANGELOG.md

Co-Authored-By: Charmander <~@charmander.me>

Co-authored-by: Charmander <~@charmander.me>
2020-01-09 23:33:40 -06:00
Brian C
19308f9ceb
Result.fields should always be an array (#2060)
This fixes a subtle backwards incompatible change.  Added a test to prevent further regressions.  Closes #2056
2020-01-09 21:30:53 -06:00
Brian C
8eca181d20
Fix pg-query-stream implementation (#2051)
* Fix pg-query-stream

There were some subtle behaviors with the stream being implemented incorrectly & not working as expected with async iteration.  I've modified the code based on #2050 and comments in #2035 to have better test coverage of async iterables and update the internals significantly to more closely match the readable stream interface.

Note: this is a __breaking__ (semver major) change to this package as the close event behavior is changed slightly, and `highWaterMark` is no longer supported.  It shouldn't impact most usage, but breaking regardless.

* Remove a bunch of additional code

* Add test for destroy + error propagation

* Add failing test for destroying unsubmitted stream

* Do not throw an uncatchable error when closing an unused cursor
2019-12-29 23:08:09 -06:00
Brian M. Carlson
6d93951783 Publish
- pg-cursor@2.1.2
 - pg-query-stream@2.1.2
 - pg@7.17.0
pg-cursor@2.1.2 pg-query-stream@2.1.2 pg@7.17.0
2019-12-29 17:50:24 +00:00
Brian M. Carlson
c8b9488d7c Update changelog 2019-12-29 17:45:50 +00:00
Brian C
6b39253a54
Merge pull request #2049 from aheuermann/idle_in_transaction_session_timeout
Adding ability to pass through idle_in_transaction_session_tim…
2019-12-29 11:38:30 -06:00
Brian M. Carlson
af4d05445d Publish
- pg-cursor@2.1.1
 - pg-pool@2.0.9
 - pg-query-stream@2.1.1
 - pg@7.16.1
pg-cursor@2.1.1 pg-pool@2.0.9 pg-query-stream@2.1.1 pg@7.16.1
2019-12-28 17:16:42 +00:00
Brian C
0b87d494ad
Merge pull request #2048 from brianc/bmc/add-pg-pool
Add pg-pool to monorepo
2019-12-28 10:28:26 -06:00
Andrew Heuermann
6ddbe6ab60
Close connection after version check 2019-12-28 09:24:45 -06:00
Andrew Heuermann
839043206d
Only run tests on >= v10 2019-12-28 09:02:04 -06:00
Andrew Heuermann
6363778675
Fixing test 2019-12-27 16:04:45 -06:00
Andrew Heuermann
bb8e806bc5
Adding ability to pass through idle_in_transaction_session_timeout 2019-12-27 15:31:19 -06:00
Brian M. Carlson
637bcf355c Cleanup things a bit 2019-12-27 17:52:28 +00:00
Brian M. Carlson
4c27ad294f Add 'packages/pg-pool/' from commit 'cb96ae2d6e37b1414df405d80258e0e2bafeaba0'
git-subtree-dir: packages/pg-pool
git-subtree-mainline: 69345eb96aa2552b288247960aa7126d41210eb6
git-subtree-split: cb96ae2d6e37b1414df405d80258e0e2bafeaba0
2019-12-27 04:01:42 +00:00
Brian M. Carlson
69345eb96a Publish
- pg-cursor@2.1.0
 - pg-packet-stream@1.1.0
 - pg-query-stream@2.1.0
 - pg@7.16.0
pg-cursor@2.1.0 pg-packet-stream@1.1.0 pg-query-stream@2.1.0 pg@7.16.0
2019-12-27 03:56:07 +00:00
Brian M. Carlson
1cf64444ad Update changelog 2019-12-27 03:55:24 +00:00
Brian C
cc3b09301b
Merge pull request #2045 from brianc/bmc/add-pretest-and-prepublish
Add pretest and prepublish script
2019-12-26 21:52:35 -06:00
Brian M. Carlson
01e0644b99 Add pretest and prepublish script 2019-12-27 03:39:56 +00:00
Brian C
3278dced6e
Merge pull request #2044 from brianc/bmc/packet-stream-parser
Add packet stream parser
2019-12-26 21:36:26 -06:00
Brian C
2431a63853
Merge pull request #2042 from brianc/bmc/callback-on-ready
Fire close callback when ready for next query
2019-12-26 21:30:06 -06:00
Brian M. Carlson
6168f2ee0d Disable lint on missing module since the file is not included 2019-12-27 03:22:30 +00:00
Brian M. Carlson
89b451e934 Properly merge dockerfile 2019-12-27 03:15:51 +00:00
Brian M. Carlson
68e063e30c Merge origin/master 2019-12-27 02:59:42 +00:00
Brian M. Carlson
766e48f34a Update types & move some configs around 2019-12-27 02:55:18 +00:00
Brian M. Carlson
47af4e810f Don't modify path
vscode remote docker does some crazy path overriding...I think this messed it up somehow.  Anyways, no need to do this.
2019-12-26 19:20:43 +00:00
Brian M. Carlson
5a6166d0ae Fire close callback when ready for next query
Working on fixing some timing issues in pg-query-stream it uncovered an issue where the cursor is firing its 'close' callback before it's actually entirely ready to dispatch another query.  This change makes the close callback trigger when the connection re-enters `readyForQuery` state.
2019-12-26 18:36:29 +00:00