jackc/pgx · error
cannot scan NULL into *uint32
Error message
cannot scan NULL into *uint32
What it means
Error "cannot scan NULL into *uint32" thrown in jackc/pgx.
Source
Thrown at pgtype/builtin_wrappers.go:183
if v.Int64 > math.MaxUint16 {
return fmt.Errorf("%d is greater than maximum value for uint16", v.Int64)
}
*w = uint16Wrapper(v.Int64)
return nil
}
func (w uint16Wrapper) Int64Value() (Int8, error) {
return Int8{Int64: int64(w), Valid: true}, nil
}
type uint32Wrapper uint32
func (w uint32Wrapper) SkipUnderlyingTypePlan() {}
func (w *uint32Wrapper) ScanInt64(v Int8) error {
if !v.Valid {
return fmt.Errorf("cannot scan NULL into *uint32")
}
if v.Int64 < 0 {
return fmt.Errorf("%d is less than minimum value for uint32", v.Int64)
}
if v.Int64 > math.MaxUint32 {
return fmt.Errorf("%d is greater than maximum value for uint32", v.Int64)
}
*w = uint32Wrapper(v.Int64)
return nil
}
func (w uint32Wrapper) Int64Value() (Int8, error) {
return Int8{Int64: int64(w), Valid: true}, nil
}
type uint64Wrapper uint64View on GitHub (pinned to ec1a0befd2)
When it happens
Trigger: Thrown at pgtype/builtin_wrappers.go:183 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/fb418d91ec4adff7.json.
Report an issue: GitHub.