diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-07-03 17:08:25 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-07-03 17:08:25 -0400 |
commit | 89a39d4a4da01b13dddcbcf9bcdac2205c9b1279 (patch) | |
tree | f355354edd088330a745456b8dfc71f16738ebab /src | |
parent | b762bbde30d21d6a091d44cc2cbbfb1c9550be52 (diff) | |
download | postgresql-89a39d4a4da01b13dddcbcf9bcdac2205c9b1279.tar.gz postgresql-89a39d4a4da01b13dddcbcf9bcdac2205c9b1279.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/jsonpath_gram.y | 1 | ||||
-rw-r--r-- | src/test/regress/expected/jsonb_sqljson.out | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y index 06d4c8c229e..57f6beb27bf 100644 --- a/src/backend/utils/adt/jsonpath_gram.y +++ b/src/backend/utils/adt/jsonpath_gram.y @@ -74,7 +74,6 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr, %pure-parser %expect 0 %name-prefix="jsonpath_yy" -%error-verbose %parse-param {JsonPathParseResult **result} %union diff --git a/src/test/regress/expected/jsonb_sqljson.out b/src/test/regress/expected/jsonb_sqljson.out index ec7dc505933..e2f7df50a87 100644 --- a/src/test/regress/expected/jsonb_sqljson.out +++ b/src/test/regress/expected/jsonb_sqljson.out @@ -2083,7 +2083,7 @@ SELECT JSON_QUERY(jsonb '{"a": 123}', '$' || '.' || 'a' WITH WRAPPER); -- Should fail (invalid path) SELECT JSON_QUERY(jsonb '{"a": 123}', 'error' || ' ' || 'error'); -ERROR: syntax error, unexpected IDENT_P at or near " " of jsonpath input +ERROR: syntax error at or near " " of jsonpath input -- Should fail (not supported) SELECT * FROM JSON_TABLE(jsonb '{"a": 123}', '$' || '.' || 'a' COLUMNS (foo int)); ERROR: only string constants supported in JSON_TABLE path specification |