2
0

Simplify copy encoding

This commit is contained in:
Jack Christensen
2022-03-05 20:27:36 -06:00
parent e5685a34fc
commit 2831eedef3
3 changed files with 20 additions and 36 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ func (ct *copyFrom) buildCopyBuf(buf []byte, sd *pgconn.StatementDescription) (b
buf = pgio.AppendInt16(buf, int16(len(ct.columnNames)))
for i, val := range values {
buf, err = encodePreparedStatementArgument(ct.conn.typeMap, buf, sd.Fields[i].DataTypeOID, val)
buf, err = encodeCopyValue(ct.conn.typeMap, buf, sd.Fields[i].DataTypeOID, val)
if err != nil {
return false, nil, err
}