Update CHANGELOG.md and a fix last-minute review nit

This commit is contained in:
Nickolay Ponomarev 2020-05-27 05:04:22 +03:00
parent 5aacc5ebcd
commit 320d2f2d05
3 changed files with 4 additions and 5 deletions

View file

@ -13,6 +13,7 @@ Check https://github.com/andygrove/sqlparser-rs/commits/master for undocumented
- Support Snowflake's `FROM (table_name)` (#155) - thanks @eyalleshem!
### Added
- Support basic forms of `CREATE INDEX` and `DROP INDEX` (#167) - thanks @mashuai!
- Support MSSQL `TOP (<N>) [ PERCENT ] [ WITH TIES ]` (#150) - thanks @alexkyllo!
- Support MySQL `LIMIT row_count OFFSET offset` (not followed by `ROW` or `ROWS`) and remember which variant was parsed (#158) - thanks @mjibson!
- Support PostgreSQL `CREATE TABLE IF NOT EXISTS table_name` (#163) - thanks @alex-dukhno!

View file

@ -200,6 +200,7 @@ define_keywords!(
IDENTITY,
IF,
IN,
INDEX,
INDICATOR,
INNER,
INOUT,
@ -420,8 +421,7 @@ define_keywords!(
WORK,
YEAR,
ZONE,
END_EXEC = "END-EXEC",
INDEX
END_EXEC = "END-EXEC"
);
/// These keywords can't be used as a table alias, so that `FROM table_name alias`

View file

@ -943,9 +943,7 @@ impl Parser {
let index_name = self.parse_object_name()?;
self.expect_keyword("ON")?;
let table_name = self.parse_object_name()?;
self.expect_token(&Token::LParen)?;
let columns = self.parse_comma_separated(Parser::parse_identifier)?;
self.expect_token(&Token::RParen)?;
let columns = self.parse_parenthesized_column_list(Mandatory)?;
Ok(Statement::CreateIndex {
name: index_name,
table_name,