{"id":"811b02bdf6ab809f","repo":"jackc/pgx","slug":"cannot-scan-null-into-float32","errorCode":null,"errorMessage":"cannot scan NULL into *float32","messagePattern":"cannot scan NULL into \\*float32","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/builtin_wrappers.go","lineNumber":315,"sourceCode":"\t\treturn fmt.Errorf(\"cannot scan %v into *uint\", ui)\n\t}\n\n\t*w = uintWrapper(ui)\n\n\treturn nil\n}\n\nfunc (w uintWrapper) NumericValue() (Numeric, error) {\n\treturn Numeric{Int: new(big.Int).SetUint64(uint64(w)), Valid: true}, nil\n}\n\ntype float32Wrapper float32\n\nfunc (w float32Wrapper) SkipUnderlyingTypePlan() {}\n\nfunc (w *float32Wrapper) ScanInt64(v Int8) error {\n\tif !v.Valid {\n\t\treturn fmt.Errorf(\"cannot scan NULL into *float32\")\n\t}\n\n\t*w = float32Wrapper(v.Int64)\n\n\treturn nil\n}\n\nfunc (w float32Wrapper) Int64Value() (Int8, error) {\n\tif w > math.MaxInt64 {\n\t\treturn Int8{}, fmt.Errorf(\"%f is greater than maximum value for int64\", w)\n\t}\n\n\treturn Int8{Int64: int64(w), Valid: true}, nil\n}\n\nfunc (w *float32Wrapper) ScanFloat64(v Float8) error {\n\tif !v.Valid {\n\t\treturn fmt.Errorf(\"cannot scan NULL into *float32\")","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/builtin_wrappers.go#L297-L333","documentation":"Error \"cannot scan NULL into *float32\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/builtin_wrappers.go:315 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}