Skip to content

Copy all but special-cased params from URL query string to config - #7

Merged
monteslu merged 1 commit into
iceddev:masterfrom
motiz88:extra-keys
Jun 27, 2017
Merged

monteslu merged 1 commit into
iceddev:masterfrom
motiz88:extra-keys

Conversation

@motiz88

@motiz88 motiz88 commented Dec 30, 2015

Copy link
Copy Markdown
Contributor

This semver-minor change is an alternative to whitelisting each individual Postgres parameter.

The "whitelist" approach can and does coexist with this change, in the special handling of "ssl". In my view, future work can still add special handling for more params based on their types as listed in the Postgres docs, but clients must always also be able to deal with raw strings.

@phated

phated commented Dec 30, 2015

Copy link
Copy Markdown

That's pretty cool. Can you open an issue on https://github.com/brianc/node-postgres and link it back here. I always make sure to get visibility from the main community using this before adopting changes.

@elmigranto

Copy link
Copy Markdown

@IceDev @phated

Can we merge this in? If I understand change correctly, it just copies most of querystring parameters into output? Also relevant: brianc/node-postgres#1095

Comment thread index.js
delete result.query[key];
});

Object.getOwnPropertyNames(result.query).forEach(function(key) {

@elmigranto elmigranto Aug 31, 2016 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object.getOwnPropertyNames is not available in 0.10 and 0.12, so probably change it to Object.keys?

@monteslu
monteslu merged commit e6643e4 into iceddev:master Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants