From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables
Date: Thu, 22 Jul 2021 22:34:30 +0000
Message-ID: <E1m6hGw-0003Ho-Gw@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/80ba4bb383538a2ee846fece6a7b8da9518b6866
Modified Files
--------------
doc/src/sgml/ref/alter_trigger.sgml | 15 ++-
src/backend/commands/trigger.c | 214 ++++++++++++++++++++++++++-------
src/test/regress/expected/triggers.out | 76 ++++++++++++
src/test/regress/sql/triggers.sql | 47 ++++++++
4 files changed, 307 insertions(+), 45 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables
In-Reply-To: <E1m6hGw-0003Ho-Gw@gemulon.postgresql.org>
References: <E1m6hGw-0003Ho-Gw@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox