correctly encode CopyInResponse's format field

query-exec-mode
Matt Jibson 2020-07-31 15:42:06 -06:00 committed by GitHub
parent 7746f223e0
commit 6d0b4c45e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -48,6 +48,7 @@ func (src *CopyInResponse) Encode(dst []byte) []byte {
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)