From 39b09f2c4af27a3ed19ab8def20ea094df8f65e5 Mon Sep 17 00:00:00 2001 From: jinhua luo Date: Tue, 25 Jun 2019 01:05:28 +0800 Subject: [PATCH] cast bytea to make []byte suitable for both string and binary string types --- internal/sanitize/sanitize.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sanitize/sanitize.go b/internal/sanitize/sanitize.go index 53543b89..8939d797 100644 --- a/internal/sanitize/sanitize.go +++ b/internal/sanitize/sanitize.go @@ -87,7 +87,7 @@ func QuoteString(str string) string { } func QuoteBytes(buf []byte) string { - return `'\x` + hex.EncodeToString(buf) + "'" + return `'\x` + hex.EncodeToString(buf) + "'::bytea" } type sqlLexer struct {