{"id":"85273c36fc70e6b4","repo":"jackc/pgx","slug":"record-incomplete-w","errorCode":null,"errorMessage":"Record incomplete: %w","messagePattern":"Record incomplete: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/composite.go","lineNumber":299,"sourceCode":"\ntype CompositeBinaryScanner struct {\n\tm *Map\n\tr *pgio.Reader\n\n\tfieldCount int32\n\tfieldBytes []byte\n\tfieldOID   uint32\n\terr        error\n}\n\n// NewCompositeBinaryScanner a scanner over a binary encoded composite value.\nfunc NewCompositeBinaryScanner(m *Map, src []byte) *CompositeBinaryScanner {\n\tr := pgio.NewReader(src)\n\n\t// Each field requires at least 8 bytes: 4 for the OID and 4 for the length prefix.\n\tfieldCount := r.Count(8)\n\tif err := r.Err(); err != nil {\n\t\treturn &CompositeBinaryScanner{err: fmt.Errorf(\"Record incomplete: %w\", err)}\n\t}\n\n\treturn &CompositeBinaryScanner{\n\t\tm:          m,\n\t\tr:          r,\n\t\tfieldCount: int32(fieldCount),\n\t}\n}\n\n// Next advances the scanner to the next field. It returns false after the last field is read or an error occurs. After\n// Next returns false, the Err method can be called to check if any errors occurred.\nfunc (cfs *CompositeBinaryScanner) Next() bool {\n\tif cfs.err != nil {\n\t\treturn false\n\t}\n\n\tif cfs.r.Remaining() == 0 {\n\t\treturn false","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/composite.go#L281-L317","documentation":"Error \"Record incomplete: %w\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/composite.go:299 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}