LucaCappelletti94 opened a new pull request, #2766: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2766
In `CREATE TABLE ... PARTITION OF`, a column entry is `column_name [ WITH OPTIONS ] [ column_constraint ... ]` and carries no data type (https://www.postgresql.org/docs/current/sql-createtable.html). The parser always read a type there, so `(id NOT NULL)` became a column of type `NOT` with a `NULL` option, and `(id)` or `(id DEFAULT 0)` failed to parse. In the `PARTITION OF` form, column entries now parse with `DataType::Unspecified`, the shape SQLite's untyped columns already use. `WITH OPTIONS` is a noise word that PostgreSQL's own parse tree also discards, so it is accepted and dropped like `[ COLUMN ]` in `ALTER TABLE`. A data type in this position is now rejected, as PostgreSQL rejects it. Thanks to @s5dsn-eqee for spotting this one. Closes #2762. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
