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).
Similar to #52, this passes
paramFormats
andparamLengths
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
andparamLengths
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!