Skip to content

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