fix(pg): fix binary format buffer handling by faulpeltz · Pull Request #3496 · brianc/node-postgres
- change Parser.parseDataRowMessage() to produce a buffer slice instead of a string - change Result.parseRow() and _parseRowAsArray() to create the string from the buffer slice if not in binary mode
DataRowMessage.fields may now be either a string or a buffer slice depending on the field format. this relies on some assumption: - fieldDescriptions is accurate when parseDataRowmessage is called. we make a similar assumption in pg/lib/result.js, so this seems fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters