Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7d9bf58

Browse files
committed
Remove %error-verbose directive from jsonpath parser
None of the other bison parsers contains this directive, and it gives rise to some unfortunate and impenetrable messages, so just remove it. Backpatch to release 12, where it was introduced. Per gripe from Erik Rijkers Discussion: https://postgr.es/m/ba069ce2-a98f-dc70-dc17-2ccf2a9bf7c7@xs4all.nl
1 parent 8b042df commit 7d9bf58

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/backend/utils/adt/jsonpath_gram.y

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr,
7474
%pure-parser
7575
%expect 0
7676
%name-prefix="jsonpath_yy"
77-
%error-verbose
7877
%parse-param {JsonPathParseResult **result}
7978

8079
%union

src/test/regress/expected/jsonb_sqljson.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ SELECT JSON_QUERY(jsonb '{"a": 123}', '$' || '.' || 'a' WITH WRAPPER);
20832083

20842084
-- Should fail (invalid path)
20852085
SELECT JSON_QUERY(jsonb '{"a": 123}', 'error' || ' ' || 'error');
2086-
ERROR: syntax error, unexpected IDENT_P at or near " " of jsonpath input
2086+
ERROR: syntax error at or near " " of jsonpath input
20872087
-- Should fail (not supported)
20882088
SELECT * FROM JSON_TABLE(jsonb '{"a": 123}', '$' || '.' || 'a' COLUMNS (foo int));
20892089
ERROR: only string constants supported in JSON_TABLE path specification

0 commit comments

Comments
 (0)