{"id":"887a5d461e07af38","repo":"jackc/pgx","slug":"cannot-scan-null-into-string","errorCode":null,"errorMessage":"cannot scan NULL into *string","messagePattern":"cannot scan NULL into \\*string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/builtin_wrappers.go","lineNumber":387,"sourceCode":"\t\treturn fmt.Errorf(\"cannot scan NULL into *float64\")\n\t}\n\n\t*w = float64Wrapper(v.Float64)\n\n\treturn nil\n}\n\nfunc (w float64Wrapper) Float64Value() (Float8, error) {\n\treturn Float8{Float64: float64(w), Valid: true}, nil\n}\n\ntype stringWrapper string\n\nfunc (w stringWrapper) SkipUnderlyingTypePlan() {}\n\nfunc (w *stringWrapper) ScanText(v Text) error {\n\tif !v.Valid {\n\t\treturn fmt.Errorf(\"cannot scan NULL into *string\")\n\t}\n\n\t*w = stringWrapper(v.String)\n\treturn nil\n}\n\nfunc (w stringWrapper) TextValue() (Text, error) {\n\treturn Text{String: string(w), Valid: true}, nil\n}\n\ntype timeWrapper time.Time\n\nfunc (w *timeWrapper) ScanDate(v Date) error {\n\tif !v.Valid {\n\t\treturn fmt.Errorf(\"cannot scan NULL into *time.Time\")\n\t}\n\n\tswitch v.InfinityModifier {","sourceCodeStart":369,"sourceCodeEnd":405,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/builtin_wrappers.go#L369-L405","documentation":"Error \"cannot scan NULL into *string\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/builtin_wrappers.go:387 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}