{"record":{"id":"6c4ddb7bbd7d1876","repo":"jackc/pgx","slug":"invalid-lower-value-w","errorCode":null,"errorMessage":"invalid lower value: %w","messagePattern":"invalid lower value: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/range.go","lineNumber":57,"sourceCode":"\n\tskipWhitespace(buf)\n\n\tr, _, err := buf.ReadRune()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid lower bound: %w\", err)\n\t}\n\tswitch r {\n\tcase '(':\n\t\tutr.LowerType = Exclusive\n\tcase '[':\n\t\tutr.LowerType = Inclusive\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"missing lower bound, instead got: %v\", string(r))\n\t}\n\n\tr, _, err = buf.ReadRune()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid lower value: %w\", err)\n\t}\n\tbuf.UnreadRune()\n\n\tif r == ',' {\n\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)","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/range.go#L39-L75","documentation":"After the opening bracket, the parser could not read the first rune of the lower bound value (buffer read error, typically end of input). The wrapped error comes from the underlying bytes.Buffer, meaning the string ended right after '(' or '['.","triggerScenarios":"Thrown at pgtype/range.go:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the range string is complete and not truncated after the opening bracket","Validate input length before parsing","Log the raw string to identify truncation at the source"],"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"}