pgsql-ast-parser
pgsql-ast-parser copied to clipboard
`ALTER INDEX` statements fail to parse
Parsing:
ALTER INDEX foo_idx RENAME TO bar_idx;
Fails with:
Error: Syntax error at line 1 col 13:
ALTER INDEX foo_idx
^
Unexpected word token: "foo_idx". I did not expect any more input. Here is the state of my parse table:
kw_sequence → %word ●
at Parser.feed (/src/node_modules/nearley/lib/nearley.js:343:27)
at _parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:110:16)
at doParse (/src/node_modules/pgsql-ast-parser/src/parser.ts:57:27)
at Object.parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:60:11)