jackc/pgx · error
%d is less than minimum value for uint64
Error message
%d is less than minimum value for uint64
What it means
Error "%d is less than minimum value for uint64" thrown in jackc/pgx.
Source
Thrown at pgtype/int.go:497
func (scanPlanBinaryInt2ToUint64) Scan(src []byte, dst any) error {
if src == nil {
return fmt.Errorf("cannot scan NULL into %T", dst)
}
raw, err := pgio.Uint16Exact(src)
if err != nil {
return fmt.Errorf("uint2: %w", err)
}
p, ok := (dst).(*uint64)
if !ok {
return ErrScanTargetTypeChanged
}
n := int16(raw)
if n < 0 {
return fmt.Errorf("%d is less than minimum value for uint64", n)
}
*p = uint64(n)
return nil
}
type scanPlanBinaryInt2ToInt struct{}
func (scanPlanBinaryInt2ToInt) Scan(src []byte, dst any) error {
if src == nil {
return fmt.Errorf("cannot scan NULL into %T", dst)
}
raw, err := pgio.Uint16Exact(src)
if err != nil {
return fmt.Errorf("int2: %w", err)
}View on GitHub (pinned to ec1a0befd2)
When it happens
Trigger: Thrown at pgtype/int.go:497 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/3ca7dc28ddc4a129.json.
Report an issue: GitHub.