You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is legal PSQL, libpq, etc. all allow it. pgjdbc-ng throws this error:
Error parsing SQL at position 40 (PREPARE test_plan AS SELECT hashtext($1)): Error near:
Interestingly, pgjdbc-ng does not throw on this similar query:
PREPARE test_plan AS SELECT $1
My company came across this after we introduced a new grammar for shredding JSON, which is biased towards $ expressions without quoting, embracing JSON Path, etc. The syntax we have looks like this:
select * from flatten('{"a":1,"b":2}', $ as root) as f
We are very keen to support this feature of our own in our product, which includes a query editor that uses pgdjbc-ng. Unfortunately our own product can't execute its native JSON grammar without a fix here.
The text was updated successfully, but these errors were encountered:
- when a $1 or $$foo$$ is within () expression, like a function
invocation, parse the $ as plain grammar piece
- add a test for this situation which does not parse otherwise
and throws ParseException
- when a $1 or $$foo$$ is within () expression, like a function
invocation, parse the $ as plain grammar piece
- add a test for this situation which does not parse otherwise
and throws ParseException
- when a $1 or $$foo$$ is within () expression, like a function
invocation, parse the $ as plain grammar piece
- add a test for this situation which does not parse otherwise
and throws ParseException
Simple repro
This is legal PSQL, libpq, etc. all allow it. pgjdbc-ng throws this error:
Interestingly, pgjdbc-ng does not throw on this similar query:
My company came across this after we introduced a new grammar for shredding JSON, which is biased towards $ expressions without quoting, embracing JSON Path, etc. The syntax we have looks like this:
We are very keen to support this feature of our own in our product, which includes a query editor that uses pgdjbc-ng. Unfortunately our own product can't execute its native JSON grammar without a fix here.
The text was updated successfully, but these errors were encountered: