pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables
2+ messages / 2 participants
[nested] [flat]

* pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables
@ 2021-07-22 22:34 Alvaro Herrera <alvherre@alvh.no-ip.org>
  2021-07-23 01:26 ` Re: pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Alvaro Herrera @ 2021-07-22 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.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

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables
  2021-07-22 22:34 pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2021-07-23 01:26 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-07-23 01:26 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Make ALTER TRIGGER RENAME consistent for partitioned tables

Looks like the test case you chose has some locale-dependent-sorting
issues.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-07-23 01:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 22:34 pgsql: Make ALTER TRIGGER RENAME consistent for partitioned tables Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-23 01:26 ` Tom Lane <tgl@sss.pgh.pa.us>

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