Fix text format array decoding with a string of "NULL"
It was incorrectly being treated as NULL instead of 'NULL'. fixes https://github.com/jackc/pgx/issues/1494
This commit is contained in:
@@ -303,7 +303,7 @@ func (c *ArrayCodec) decodeText(m *Map, arrayOID uint32, src []byte, array Array
|
||||
for i, s := range uta.Elements {
|
||||
elem := array.ScanIndex(i)
|
||||
var elemSrc []byte
|
||||
if s != "NULL" {
|
||||
if s != "NULL" || uta.Quoted[i] {
|
||||
elemSrc = []byte(s)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user