Slightly more efficient hex bytea decode

This commit is contained in:
Max Amanshauser 2012-08-18 13:17:10 +02:00
parent 9b078eddcc
commit 669826a866

View File

@ -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