{"id":"3ca7dc28ddc4a129","repo":"jackc/pgx","slug":"d-is-less-than-minimum-value-for-uint64-3ca7dc","errorCode":null,"errorMessage":"%d is less than minimum value for uint64","messagePattern":"(.+?) is less than minimum value for uint64","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/int.go","lineNumber":497,"sourceCode":"\nfunc (scanPlanBinaryInt2ToUint64) Scan(src []byte, dst any) error {\n\tif src == nil {\n\t\treturn fmt.Errorf(\"cannot scan NULL into %T\", dst)\n\t}\n\n\traw, err := pgio.Uint16Exact(src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"uint2: %w\", err)\n\t}\n\n\tp, ok := (dst).(*uint64)\n\tif !ok {\n\t\treturn ErrScanTargetTypeChanged\n\t}\n\n\tn := int16(raw)\n\tif n < 0 {\n\t\treturn fmt.Errorf(\"%d is less than minimum value for uint64\", n)\n\t}\n\n\t*p = uint64(n)\n\n\treturn nil\n}\n\ntype scanPlanBinaryInt2ToInt struct{}\n\nfunc (scanPlanBinaryInt2ToInt) Scan(src []byte, dst any) error {\n\tif src == nil {\n\t\treturn fmt.Errorf(\"cannot scan NULL into %T\", dst)\n\t}\n\n\traw, err := pgio.Uint16Exact(src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"int2: %w\", err)\n\t}","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/int.go#L479-L515","documentation":"Error \"%d is less than minimum value for uint64\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/int.go:497 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}