Describe the bug
Using DISTINCT inside the string_agg function in PostgresQL, throws this error:
SyntaxError]: Expected "(", "--", ".", "/*", or [ \t\n\r] but "t" found.
Database Engine
PostgresQL
To Reproduce
-the SQL that be parsed
SELECT string_agg(DISTINCT title) FROM jobs;
-the node-sql-parser version
5.1.0
-the node version
Node v18
Expected behavior
I expect the query to be parsed as it is valid (Postgres)QL and works when querying the database.
Additional context
Removing the DISTINCT within the string_agg function works, also 'normal' DISTINCT (outside string_agg function) works as well.
Describe the bug Using DISTINCT inside the string_agg function in PostgresQL, throws this error:
SyntaxError]: Expected "(", "--", ".", "/*", or [ \t\n\r] but "t" found.
Database Engine PostgresQL
To Reproduce -the SQL that be parsed SELECT string_agg(DISTINCT title) FROM jobs;
-the node-sql-parser version 5.1.0
-the node version Node v18
Expected behavior I expect the query to be parsed as it is valid (Postgres)QL and works when querying the database.
Additional context Removing the DISTINCT within the string_agg function works, also 'normal' DISTINCT (outside string_agg function) works as well.