Skip to content

Add support for lookup parameter (#1) #2564

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leithouse
Copy link

  • add lookup support to ssl param

The docs @ https://node-postgres.com/api/client claim that the ssl param is "passed directly to node.TLSSocket, supports all tls.connect options". That statement is inaccurate as "connect" is only called with port and host. This patch doesn't delve into trying to make it fully compatible with all tls.connect options, but it does add support for the lookup parameter that's ubiquitous across all node connect functions.

* add lookup support to ssl param

The docs @ https://node-postgres.com/api/client claim that the ssl param is "passed directly to node.TLSSocket, supports all tls.connect options". That statement is inaccurate, this patch doesn't make it fully compatible with all tls.connect options, but it does add support for the lookup parameter that's ubiquitous across all node connect functions.
@leithouse
Copy link
Author

Alternatively maybe the documentation should change to claim it's passed directly to "createSecureContext" and there should be a separate param for connect options

Copy link
Collaborator

@charmander charmander left a comment

Choose a reason for hiding this comment

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

I think it should just go in the regular options, since it applies to non-SSL connections as well. (The documentation change suggestion seems good.)

Also, if you update it to do that, no need to include the date/change comment; there’s nothing particularly unusual going on and that’s what version control is for.

(A feature should also have a test before it goes in, but you don’t have to be the one to write it.)

@leithouse
Copy link
Author

Not ignoring your change request, planning on implementing it, time is just a scarce commodity for me at the moment.

@brianc
Copy link
Owner

brianc commented Jun 23, 2021

time is just a scarce commodity for me at the moment.

I feel that. no worries.

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.

3 participants