Skip to content

Commit 320d2f2

Browse files
committed
Update CHANGELOG.md and a fix last-minute review nit
1 parent 5aacc5e commit 320d2f2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Check https://github.com/andygrove/sqlparser-rs/commits/master for undocumented
1313
- Support Snowflake's `FROM (table_name)` (#155) - thanks @eyalleshem!
1414

1515
### Added
16+
- Support basic forms of `CREATE INDEX` and `DROP INDEX` (#167) - thanks @mashuai!
1617
- Support MSSQL `TOP (<N>) [ PERCENT ] [ WITH TIES ]` (#150) - thanks @alexkyllo!
1718
- Support MySQL `LIMIT row_count OFFSET offset` (not followed by `ROW` or `ROWS`) and remember which variant was parsed (#158) - thanks @mjibson!
1819
- Support PostgreSQL `CREATE TABLE IF NOT EXISTS table_name` (#163) - thanks @alex-dukhno!

src/dialect/keywords.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ define_keywords!(
200200
IDENTITY,
201201
IF,
202202
IN,
203+
INDEX,
203204
INDICATOR,
204205
INNER,
205206
INOUT,
@@ -420,8 +421,7 @@ define_keywords!(
420421
WORK,
421422
YEAR,
422423
ZONE,
423-
END_EXEC = "END-EXEC",
424-
INDEX
424+
END_EXEC = "END-EXEC"
425425
);
426426

427427
/// These keywords can't be used as a table alias, so that `FROM table_name alias`

src/parser.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,7 @@ impl Parser {
943943
let index_name = self.parse_object_name()?;
944944
self.expect_keyword("ON")?;
945945
let table_name = self.parse_object_name()?;
946-
self.expect_token(&Token::LParen)?;
947-
let columns = self.parse_comma_separated(Parser::parse_identifier)?;
948-
self.expect_token(&Token::RParen)?;
946+
let columns = self.parse_parenthesized_column_list(Mandatory)?;
949947
Ok(Statement::CreateIndex {
950948
name: index_name,
951949
table_name,

0 commit comments

Comments
 (0)