{"id":"a5cba5fae6b1c7dc","repo":"jackc/pgx","slug":"v-only-has-d-public-fields-d-is-out-of-bound","errorCode":null,"errorMessage":"%#v only has %d public fields - %d is out of bounds","messagePattern":"%#v only has (.+?) public fields - (.+?) is out of bounds","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/builtin_wrappers.go","lineNumber":723,"sourceCode":"\n\tuuid := UUID{Valid: true}\n\tcopy(uuid.Bytes[:], w)\n\treturn uuid, nil\n}\n\n// structWrapper implements CompositeIndexGetter for a struct.\ntype structWrapper struct {\n\ts              any\n\texportedFields []reflect.Value\n}\n\nfunc (w structWrapper) IsNull() bool {\n\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)","sourceCodeStart":705,"sourceCodeEnd":741,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/builtin_wrappers.go#L705-L741","documentation":"Error \"%#v only has %d public fields - %d is out of bounds\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/builtin_wrappers.go:723 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}