mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Merge branch 'fix-record-panic' of https://github.com/aka-rider/pgx into aka-rider-fix-record-panic
This commit is contained in:
commit
fcf7df042b
@ -98,9 +98,10 @@ func (dst *Record) DecodeBinary(ci *ConnInfo, src []byte) error {
|
|||||||
|
|
||||||
var binaryDecoder BinaryDecoder
|
var binaryDecoder BinaryDecoder
|
||||||
if dt, ok := ci.DataTypeForOID(fieldOID); ok {
|
if dt, ok := ci.DataTypeForOID(fieldOID); ok {
|
||||||
if binaryDecoder, ok = dt.Value.(BinaryDecoder); !ok {
|
binaryDecoder, _ = dt.Value.(BinaryDecoder)
|
||||||
return errors.Errorf("unknown oid while decoding record: %v", fieldOID)
|
}
|
||||||
}
|
if binaryDecoder == nil {
|
||||||
|
return errors.Errorf("unknown oid while decoding record: %v", fieldOID)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fieldBytes []byte
|
var fieldBytes []byte
|
||||||
|
Loading…
x
Reference in New Issue
Block a user