Byte strings in postgres aren't 0x...
Byte strings in postgres are actually E'\x...' not 0x... This is part of the follow-up to #1872 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
210c30a7dd
commit
2d626529e5
|
@ -824,6 +824,11 @@ func (db *postgres) SetQuotePolicy(quotePolicy QuotePolicy) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FormatBytes formats bytes
|
||||||
|
func (db *postgres) FormatBytes(bs []byte) string {
|
||||||
|
return fmt.Sprintf("E'\\x%x'", bs)
|
||||||
|
}
|
||||||
|
|
||||||
func (db *postgres) SQLType(c *schemas.Column) string {
|
func (db *postgres) SQLType(c *schemas.Column) string {
|
||||||
var res string
|
var res string
|
||||||
switch t := c.SQLType.Name; t {
|
switch t := c.SQLType.Name; t {
|
||||||
|
|
Loading…
Reference in New Issue