Skip to content

Commit

Permalink
fix: Adding overall format before appending ColumnFormatCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukundan Kavanur Kidambi authored and jackc committed Apr 2, 2022
1 parent 40ecac4 commit fa2b096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion copy_both_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fa2b096

Please sign in to comment.