Failing SQL feature
PostgreSQL CREATE INDEX header variants are rejected:
CONCURRENTLY between INDEX and the index name;
- an omitted index name;
ON ONLY table_name.
SQL examples
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS pg_idx_email
ON pg_index_test USING btree (email);
CREATE INDEX ON ONLY pg_index_test USING btree (id DESC);
Actual behavior
Tested with JSqlParser 5.4-SNAPSHOT at 9a32ff568f580178d9a27b101596aa43eb45d0b7:
- The first statement treats
CONCURRENTLY as the index name and fails at IF.
- The second requires an index name and fails at
ON.
Expected behavior
Both statements should return CreateIndex, deparse losslessly, and expose concurrently, only, and the optional index name as structured properties rather than tail strings.
Software information and server validation
This issue is limited to the command header. Index key and trailing clauses are tracked separately.
AI assistance
OpenAI Codex was used to assemble and execute the parser/server comparison. The cases were checked against the PostgreSQL 18 documentation and an actual PostgreSQL 18.6 server.
Failing SQL feature
PostgreSQL
CREATE INDEXheader variants are rejected:CONCURRENTLYbetweenINDEXand the index name;ON ONLY table_name.SQL examples
Actual behavior
Tested with JSqlParser
5.4-SNAPSHOTat9a32ff568f580178d9a27b101596aa43eb45d0b7:CONCURRENTLYas the index name and fails atIF.ON.Expected behavior
Both statements should return
CreateIndex, deparse losslessly, and exposeconcurrently,only, and the optional index name as structured properties rather than tail strings.Software information and server validation
5.4-SNAPSHOTpostgres:18)This issue is limited to the command header. Index key and trailing clauses are tracked separately.
AI assistance
OpenAI Codex was used to assemble and execute the parser/server comparison. The cases were checked against the PostgreSQL 18 documentation and an actual PostgreSQL 18.6 server.