Re: Define jsonpath functions as stable
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Jonathan S. Katz" <jkatz@postgresql.org>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>,
Chapman Flack <chap@anastigmatix.net>, Erik Rijkers <er@xs4all.nl>,
pgsql-hackers@lists.postgresql.org
Date: 2019-09-19T19:48:28Z
Lists: pgsql-hackers
"Jonathan S. Katz" <jkatz@postgresql.org> writes:
> I looked at the patch, but did not test it. From what I can see, it
> looks good, but perhaps we add a test in it to show that single-quoted
> literals are unsupported?
I thought about that, but it seems like it'd be memorializing some
other weird behavior:
regression=# select '''foo'''::jsonpath;
ERROR: syntax error, unexpected IDENT_P at end of jsonpath input
LINE 1: select '''foo'''::jsonpath;
^
regression=# select '''foo'' <= ''bar'''::jsonpath;
ERROR: syntax error, unexpected IDENT_P at or near " " of jsonpath input
LINE 1: select '''foo'' <= ''bar'''::jsonpath;
^
There isn't anything I like about these error messages. Seems like
the error handling in jsonpath_gram.y could use some cleanup too
... although I don't think it's a task to tackle while we're
rushing to get v12 shippable.
regards, tom lane
Commits
-
Fix some minor spec-compliance issues in jsonpath lexer.
- e56cad84d542 13.0 landed
- 5f3bec0769c1 12.0 landed
-
Doc: improve documentation around jsonpath regular expressions.
- b9cf94c8c249 12.0 landed
- 0a97edb12ec4 13.0 landed
-
Fix bogus handling of XQuery regex option flags.
- d5b90cd64855 13.0 landed
- 148881454208 12.0 landed