Update packages/pg/lib/connection-parameters.js. Fix SSL issue (#2723)
This fixes 2723 and https://github.com/brianc/node-postgres/issues/2934
@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.
@brianc, are you okay with the changes?
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 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).
@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.