{"id":"89fae5e0b23eb3ce","repo":"jackc/pgx","slug":"expected-c-v-found-c-v","errorCode":null,"errorMessage":"expected '%c' ('%#v'); found '%c' ('%#v')","messagePattern":"expected '%c' \\('%#v'\\); found '%c' \\('%#v'\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/hstore.go","lineNumber":292,"sourceCode":"\t}\n}\n\nfunc (p *hstoreParser) atEnd() bool {\n\treturn p.pos >= len(p.str)\n}\n\n// consume returns the next byte of the string, or end if the string is done.\nfunc (p *hstoreParser) consume() (b byte, end bool) {\n\tif p.pos >= len(p.str) {\n\t\treturn 0, true\n\t}\n\tb = p.str[p.pos]\n\tp.pos++\n\treturn b, false\n}\n\nfunc unexpectedByteErr(actualB, expectedB byte) error {\n\treturn fmt.Errorf(\"expected '%c' ('%#v'); found '%c' ('%#v')\", expectedB, expectedB, actualB, actualB)\n}\n\n// consumeExpectedByte consumes expectedB from the string, or returns an error.\nfunc (p *hstoreParser) consumeExpectedByte(expectedB byte) error {\n\tnextB, end := p.consume()\n\tif end {\n\t\treturn fmt.Errorf(\"expected '%c' ('%#v'); found end\", expectedB, expectedB)\n\t}\n\tif nextB != expectedB {\n\t\treturn unexpectedByteErr(nextB, expectedB)\n\t}\n\treturn nil\n}\n\n// consumeExpected2 consumes two expected bytes or returns an error.\n// This was a bit faster than using a string argument (better inlining? Not sure).\nfunc (p *hstoreParser) consumeExpected2(one, two byte) error {\n\tif p.pos+2 > len(p.str) {","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/hstore.go#L274-L310","documentation":"Error \"expected '%c' ('%#v'); found '%c' ('%#v')\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/hstore.go:292 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}