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] 5.4-SNAPSHOT: PostgreSQL CREATE INDEX header variants fail to parse #2524
PostgreSQL CREATE INDEX header variants are rejected:
CONCURRENTLY between INDEX and the index name;
an omitted index name;
ON ONLY table_name.
SQL examples
CREATEUNIQUE INDEXCONCURRENTLY IF NOT EXISTS pg_idx_email
ON pg_index_test USING btree (email);
CREATEINDEXON 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
JSqlParser: 5.4-SNAPSHOT
Database: PostgreSQL 18.6 (postgres:18)
Both forms executed successfully against a real table. The concurrent command was executed outside a transaction block.
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.
Activity