taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
818 stars 181 forks source link

Request: Posgresql INCLUDE keyword when create index #2227

Open hhlong87 opened 1 day ago

hhlong87 commented 1 day ago

Describe the bug Syntax error when I use INCLUDE keyword in create index command.

Database Engine PostgreSQL https://www.postgresql.org/docs/17/sql-createindex.html

To Reproduce -the SQL that be parsed: CREATE INDEX ON order (supplier, amount) INCLUDE(id); -the node-sql-parser: 5.3.3 -the node version: 20.11.1 -error: SyntaxError: Expected [A-Za-z0-9_-$一-龥À-ſ] but " " found.

Expected behavior Should support INCLUDE