LucaCappelletti94 opened a new pull request, #2812: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2812
`PostgreSqlDialect` rejects every form of `ALTER TABLE ... DETACH PARTITION`, so `ALTER TABLE orders DETACH PARTITION p CONCURRENTLY` fails with `Expected: ADD, RENAME, PARTITION, ... after ALTER TABLE, found: DETACH`. It is the counterpart of the `ATTACH PARTITION` support added in #2749. This adds `AlterTableOperation::DetachPartitionOf`, which holds the partition as an `ObjectName` and an optional `CONCURRENTLY` or `FINALIZE` mode, behind a new `supports_detach_partition_of` dialect method enabled for PostgreSQL. As in #2749, the generic dialect keeps reading `DETACH PARTITION` as the ClickHouse `DetachPartition` expression, so ClickHouse behaviour is unchanged. The grammar is in the [PostgreSQL `ALTER TABLE` docs](https://www.postgresql.org/docs/current/sql-altertable.html). -- 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]
