Make ALTER TRIGGER RENAME consistent for partitioned tables
Alvaro Herrera <alvherre@alvh.no-ip.org>
Make ALTER TRIGGER RENAME consistent for partitioned tables Renaming triggers on partitioned tables had two problems: first, it did not recurse to renaming the triggers on the partitions; and second, it failed to prohibit renaming clone triggers. Having triggers with different names in partitions is pointless, and furthermore pg_dump would not preserve names for partitions anyway. Not backpatched -- making the ALTER TRIGGER throw an error in stable versions might cause problems for existing scripts. Co-authored-by: Arne Roland <A.Roland@index.de> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Zhihong Yu <zyu@yugabyte.com> Discussion: https://postgr.es/m/d0fd7040c2fb4de1a111b9d9ccc456b8@index.de
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_trigger.sgml | modified | +13 −2 |
| src/backend/commands/trigger.c | modified | +171 −43 |
| src/test/regress/expected/triggers.out | modified | +76 −0 |
| src/test/regress/sql/triggers.sql | modified | +47 −0 |
Documentation touched
Discussion
- Rename of triggers for partitioned tables 42 messages · 2020-11-26 → 2021-07-26