2
0

fix: Adding overall format before appending ColumnFormatCodes

This commit is contained in:
Mukundan Kavanur Kidambi
2022-03-29 14:05:14 -07:00
committed by Jack Christensen
parent 40ecac487c
commit fa2b096400
+1 -1
View File
@@ -48,7 +48,7 @@ func (src *CopyBothResponse) Encode(dst []byte) []byte {
dst = append(dst, 'W')
sp := len(dst)
dst = pgio.AppendInt32(dst, -1)
dst = append(dst, src.OverallFormat)
dst = pgio.AppendUint16(dst, uint16(len(src.ColumnFormatCodes)))
for _, fc := range src.ColumnFormatCodes {
dst = pgio.AppendUint16(dst, fc)