{"id":"9d06cb245602a4de","repo":"jackc/pgx","slug":"cannot-scan-null-into-v","errorCode":null,"errorMessage":"cannot scan NULL into %#v","messagePattern":"cannot scan NULL into %#v","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/builtin_wrappers.go","lineNumber":736,"sourceCode":"\treturn w.s == nil\n}\n\nfunc (w structWrapper) Index(i int) any {\n\tif i >= len(w.exportedFields) {\n\t\treturn fmt.Errorf(\"%#v only has %d public fields - %d is out of bounds\", w.s, len(w.exportedFields), i)\n\t}\n\n\treturn w.exportedFields[i].Interface()\n}\n\n// ptrStructWrapper implements CompositeIndexScanner for a pointer to a struct.\ntype ptrStructWrapper struct {\n\ts              any\n\texportedFields []reflect.Value\n}\n\nfunc (w *ptrStructWrapper) ScanNull() error {\n\treturn fmt.Errorf(\"cannot scan NULL into %#v\", w.s)\n}\n\nfunc (w *ptrStructWrapper) ScanIndex(i int) any {\n\tif i >= len(w.exportedFields) {\n\t\treturn fmt.Errorf(\"%#v only has %d public fields - %d is out of bounds\", w.s, len(w.exportedFields), i)\n\t}\n\n\treturn w.exportedFields[i].Addr().Interface()\n}\n\ntype anySliceArrayReflect struct {\n\tslice reflect.Value\n}\n\nfunc (a anySliceArrayReflect) Dimensions() []ArrayDimension {\n\tif a.slice.IsNil() {\n\t\treturn nil\n\t}","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/builtin_wrappers.go#L718-L754","documentation":"Error \"cannot scan NULL into %#v\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/builtin_wrappers.go:736 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}