mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Slightly more efficient hex bytea decode
This commit is contained in:
parent
9b078eddcc
commit
669826a866
@ -119,9 +119,9 @@ var parseInterval = function(val) {
|
||||
};
|
||||
|
||||
var parseByteA = function(val) {
|
||||
if(val.match(/^\\x/)){
|
||||
if(/^\\x/.test(val)){
|
||||
// new 'hex' style response (pg >9.0)
|
||||
return new Buffer(val.replace(/^\\x/,''), 'hex');
|
||||
return new Buffer(val.substr(2), 'hex');
|
||||
}else{
|
||||
out = ""
|
||||
i = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user