jackc/pgx · error
too many fields
Error message
too many fields
What it means
Error "too many fields" thrown in jackc/pgx.
Source
Thrown at pgproto3/row_description.go:107
fd.DataTypeSize = int16(binary.BigEndian.Uint16(src[rp:]))
rp += 2
fd.TypeModifier = int32(binary.BigEndian.Uint32(src[rp:]))
rp += 4
fd.Format = int16(binary.BigEndian.Uint16(src[rp:]))
rp += 2
dst.Fields = append(dst.Fields, fd)
}
return nil
}
// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
func (src *RowDescription) Encode(dst []byte) ([]byte, error) {
dst, sp := beginMessage(dst, 'T')
if len(src.Fields) > math.MaxUint16 {
return nil, errors.New("too many fields")
}
dst = pgio.AppendUint16(dst, uint16(len(src.Fields)))
for _, fd := range src.Fields {
dst = append(dst, fd.Name...)
dst = append(dst, 0)
dst = pgio.AppendUint32(dst, fd.TableOID)
dst = pgio.AppendUint16(dst, fd.TableAttributeNumber)
dst = pgio.AppendUint32(dst, fd.DataTypeOID)
dst = pgio.AppendInt16(dst, fd.DataTypeSize)
dst = pgio.AppendInt32(dst, fd.TypeModifier)
dst = pgio.AppendInt16(dst, fd.Format)
}
return finishMessage(dst, sp)
}
// MarshalJSON implements encoding/json.Marshaler.View on GitHub (pinned to ec1a0befd2)
When it happens
Trigger: Thrown at pgproto3/row_description.go:107 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jackc/pgx@ec1a0befd2 (2026-08-04).
Data as JSON: /data/errors/eb708f3147dbbf54.json.
Report an issue: GitHub.