{"id":"01d125a406391c1b","repo":"jackc/pgx","slug":"unknown-format-code","errorCode":null,"errorMessage":"unknown format code","messagePattern":"unknown format code","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"rows.go","lineNumber":323,"sourceCode":"\t\t\tcontinue\n\t\t}\n\n\t\tif dt, ok := rows.typeMap.TypeForOID(fd.DataTypeOID); ok {\n\t\t\tvalue, err := dt.Codec.DecodeValue(rows.typeMap, fd.DataTypeOID, fd.Format, buf)\n\t\t\tif err != nil {\n\t\t\t\trows.fatal(err)\n\t\t\t}\n\t\t\tvalues = append(values, value)\n\t\t} else {\n\t\t\tswitch fd.Format {\n\t\t\tcase TextFormatCode:\n\t\t\t\tvalues = append(values, string(buf))\n\t\t\tcase BinaryFormatCode:\n\t\t\t\tnewBuf := make([]byte, len(buf))\n\t\t\t\tcopy(newBuf, buf)\n\t\t\t\tvalues = append(values, newBuf)\n\t\t\tdefault:\n\t\t\t\trows.fatal(errors.New(\"unknown format code\"))\n\t\t\t}\n\t\t}\n\n\t\tif rows.Err() != nil {\n\t\t\treturn nil, rows.Err()\n\t\t}\n\t}\n\n\treturn values, rows.Err()\n}\n\nfunc (rows *baseRows) RawValues() [][]byte {\n\treturn rows.values\n}\n\nfunc (rows *baseRows) Conn() *Conn {\n\treturn rows.conn\n}","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/rows.go#L305-L341","documentation":"Error \"unknown format code\" thrown in jackc/pgx.","triggerScenarios":"Thrown at rows.go:323 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}