Skip to content

Commit ce80061

Browse files
committed
1 parent 2c3353b commit ce80061

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const types = module.exports.types = {
3535
bytea: {
3636
to: 17,
3737
from: 17,
38-
serialize: x => '\\x' + x.toString('hex'),
38+
serialize: x => '\\x' + Buffer.from(x.buffer, x.byteOffset, x.byteLength).toString('hex'),
3939
parse: x => Buffer.from(x.slice(2), 'hex')
4040
}
4141
}

0 commit comments

Comments
 (0)