mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
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
This commit is contained in:
parent
b762bbde30
commit
89a39d4a4d
@ -74,7 +74,6 @@ static JsonPathParseItem *makeItemLikeRegex(JsonPathParseItem *expr,
|
||||
%pure-parser
|
||||
%expect 0
|
||||
%name-prefix="jsonpath_yy"
|
||||
%error-verbose
|
||||
%parse-param {JsonPathParseResult **result}
|
||||
|
||||
%union
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user