{"id":"f3f708df0f7f18eb","repo":"jackc/pgx","slug":"cannot-scan-null-into-t-f3f708","errorCode":null,"errorMessage":"cannot scan NULL into %T","messagePattern":"cannot scan NULL into %T","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/float4.go","lineNumber":207,"sourceCode":"\tcase TextFormatCode:\n\t\tswitch target.(type) {\n\t\tcase *float32:\n\t\t\treturn scanPlanTextAnyToFloat32{}\n\t\tcase Float64Scanner:\n\t\t\treturn scanPlanTextAnyToFloat64Scanner{}\n\t\tcase Int64Scanner:\n\t\t\treturn scanPlanTextAnyToInt64Scanner{}\n\t\t}\n\t}\n\n\treturn nil\n}\n\ntype scanPlanBinaryFloat4ToFloat32 struct{}\n\nfunc (scanPlanBinaryFloat4ToFloat32) 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.Uint32Exact(src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"float4: %w\", err)\n\t}\n\n\tn := int32(raw)\n\tf := (dst).(*float32)\n\t*f = math.Float32frombits(uint32(n))\n\n\treturn nil\n}\n\ntype scanPlanBinaryFloat4ToFloat64Scanner struct{}\n\nfunc (scanPlanBinaryFloat4ToFloat64Scanner) Scan(src []byte, dst any) error {\n\ts := (dst).(Float64Scanner)","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/float4.go#L189-L225","documentation":"Error \"cannot scan NULL into %T\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/float4.go:207 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}