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
{{ message }}
Repository navigation
[BUG] JSQLParser : PostgreSQL : SELECT without target expressions fails to parse #2784
PostgreSQL permits SELECT FROM ... with no target expressions. It produces rows with zero output columns. See the PostgreSQL SELECT documentation.
JSQLParser fails to parse this syntax when the SELECT is used as a derived table.
SQL Example
SELECTcount(*)
FROM (
SELECTFROM (VALUES
(1, 'alpha'),
(2, 'beta'),
(3, 'gamma')
) AS t(id, label)
) AS q;
This query executes successfully in PostgreSQL and returns: 3
Parsing error
JSQLParser throws:
ParseException: Encountered: <OPENING_BRACKET> / "(", at line 2, column 6, in lexical state DEFAULT.
Was expecting this terminal within expansion starting at n/a:
<K_LATERAL> (inside 8769:9) ...
The reported ( begins the derived table. The PostgreSQL syntax JSQLParser needs to handle is the inner SELECT immediately followed by FROM, with no target expressions.
I am sorry for asking bluntly: do we really want to support just anything or should we ask ourselves first "Why is it there and what value does it add"?
Activity
manticore-projects commentedon Oct 13, 2026
I am sorry for asking bluntly: do we really want to support just anything or should we ask ourselves first "Why is it there and what value does it add"?
feat: allow SELECT without target expressions for PostgreSQL
feat: allow SELECT without target expressions for PostgreSQL (JSQLPar…