Skip to content
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

Pass paramFormats and paramLengths onto libpq #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

danielgavrilov
Copy link

@danielgavrilov danielgavrilov commented Oct 31, 2017

Similar to #52, this passes paramFormats and paramLengths onto libpq, except the parameters are constructed in JavaScript. Includes more extensive tests.

Would be happy to add the tests onto #52 if that approach is preferred.

The intent is to fix an inconsistency in node-postgres, where non-native bindings pass buffers as binary parameters, but native bindings (using this library) pass them as strings. Passing paramFormats and paramLengths is currently enough to fix this—if these are passed, libpq correctly detects them as binary parameters (see PostgreSQL fe-exec.c).

Thanks for looking into this!

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.

1 participant