Pass buffers as parameters - #52
Conversation
Without this commit, buffers passed as parameters are processed like null-terminated strings.
Hey @lukaslihotzki I appreciate the pull request! Would you be able to provide a test for this? Otherwise I'm not going to be able to accept a patch because the risk of regressions is too high! Thanks again! ❤️ 😄 |
lukaslihotzki
commented
Apr 6, 2017
Writing the test I noticed buffers in results still are passed as hex strings, but passing raw buffers there would require much more refactoring across different libraries (at least node-pg-types and node-libpq) and then everything, including numbers, etc., had to be parsed from binary. |
danielgavrilov
commented
Oct 31, 2017
Is this getting merged? Would be happy to contribute more tests if that's what's holding it back! We ran into this problem trying to store user-generated CSV files with native bindings on node-postgres. Having a Non-native bindings handle this fine and do exactly the same as this pull request (source). |
Without this commit, buffers passed as parameters are processed like null-terminated strings.