Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Dec 30, 2015

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
Copy link

phated commented Dec 30, 2015

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

@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

delete result.query[key];
});

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

@elmigranto elmigranto Aug 31, 2016

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