Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH
Michael Paquier <michael@paquier.xyz>
Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH Attempting these commands for a non-partitioned table would result in a failure when creating the relation in transformPartitionCmd(). This gives the possibility to throw an error earlier with a much better error message, thanks to d69a3f4d70b7. The extra test cases are from me. Note that FINALIZE uses a different subcommand and it had no coverage for its failure path with non-partitioned tables. Author: Álvaro Herrera, Michael Paquier Reviewed-by: Nathan Bossart Discussion: https://postgr.es/m/202409190803.tnis52adt2n5@alvherre.pgsql
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +3 −5 |
| src/test/regress/expected/alter_table.out | modified | +10 −2 |
| src/test/regress/sql/alter_table.sql | modified | +2 −0 |
Discussion
- Partitioned tables and [un]loggedness 37 messages · 2024-04-24 → 2025-06-11