{"record":{"id":"acc37417be8315e6","repo":"jackc/pgx","slug":"invalid-upper-value-w","errorCode":null,"errorMessage":"invalid upper value: %w","messagePattern":"invalid upper value: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/range.go","lineNumber":80,"sourceCode":"\t\tutr.LowerType = Unbounded\n\t} else {\n\t\tutr.Lower, err = rangeParseValue(buf)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid lower value: %w\", err)\n\t\t}\n\t}\n\n\tr, _, err = buf.ReadRune()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"missing range separator: %w\", err)\n\t}\n\tif r != ',' {\n\t\treturn nil, fmt.Errorf(\"missing range separator: %v\", r)\n\t}\n\n\tr, _, err = buf.ReadRune()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid upper value: %w\", err)\n\t}\n\n\tif r == ')' || r == ']' {\n\t\tutr.UpperType = Unbounded\n\t} else {\n\t\tbuf.UnreadRune()\n\t\tutr.Upper, err = rangeParseValue(buf)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid upper value: %w\", err)\n\t\t}\n\n\t\tr, _, err = buf.ReadRune()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"missing upper bound: %w\", err)\n\t\t}\n\t\tswitch r {\n\t\tcase ')':\n\t\t\tutr.UpperType = Exclusive","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/range.go#L62-L98","documentation":"The parser could not read the first rune of the upper bound (end of input after the separator). The wrapped error is the buffer read error; the literal ended immediately after ',' with no upper value or closing bracket.","triggerScenarios":"Thrown at pgtype/range.go:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the range literal includes an upper bound or is unbounded with ')' / ']'","Validate completeness of the input string before parsing","Detect and reject truncated range strings at the application boundary"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}