node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

Update packages/pg/lib/connection-parameters.js. Fix SSL issue (#2723)

Open dapeleg-dn opened this issue 2 years ago • 5 comments

dapeleg-dn avatar Jun 01 '23 11:06 dapeleg-dn

This fixes 2723 and https://github.com/brianc/node-postgres/issues/2934

dapeleg-dn avatar Jun 01 '23 11:06 dapeleg-dn

@brianc, please take a look. I force-pushed the code. I walked in a slightly different way, allowing you to mix TLS definitions in both environment variables and connection string or config options.

Tests have been added as well for your request.

See my comment above regarding the sync/async discussion.

dapeleg-dn avatar Jun 05 '23 14:06 dapeleg-dn

@brianc, are you okay with the changes?

dapeleg-dn avatar Jun 12 '23 07:06 dapeleg-dn

Is there some workaround while this is being worked on? currently it seems I am blocked from using node-postgres with Google Cloud SQL.

adaboese avatar Jan 17 '24 15:01 adaboese

@adaboese You can pass your SSL configuration in the ssl property of the pg configuration object instead of implicitly through environment variables (and that ssl property can still be constructed from the same environment variables if you want).

charmander avatar Jan 18 '24 02:01 charmander

@adaboese here's the documentation - I hope its clear!

I'm going to close this PR as it doesn't seem to be being moved forward. There's an open issue (#2723) so we can take another shot at it w/o loadash and soforth.

brianc avatar May 10 '24 16:05 brianc