Closed
Description
Describe the bug
Since 4.2, queries fail to parse that use the built-in Postgres functions. Looks like this was caused by #1263.
To Reproduce
Steps to reproduce the behavior:
- Example SQL
SELECT json_object('{a, 1, b, 2}');
SELECT json_object('{{a, 1}, {b, 2}}');
SELECT json_object('{a, b}', '{1,2 }');
SELECT * FROM json_object('{a, 1, b, 2}');
SELECT * FROM json_object('{{a, 1}, {b, 2}}');
SELECT * FROM json_object('{a, b}', '{1,2 }');
- Parsing this SQL using JSqlParser with these statements
- Exception
Encountered unexpected token: "json_object" "JSON_OBJECT"
Expected behavior
The queries to parse as a function. This is a new bug as it used to work in 4.1
System
- Database you are using Postgres
- Java Version 11
- JSqlParser version 4.1 / 4.2