Re: Rename of triggers for partitioned tables

Arne Roland <a.roland@index.de>

From: Arne Roland <A.Roland@index.de>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: vignesh C <vignesh21@gmail.com>, Zhihong Yu <zyu@yugabyte.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-20T00:51:32Z
Lists: pgsql-hackers
> We are referring the trigger via it's name after all. If a child is named differently we break with that assumption. I think informing the user about that, is very valuable.


To elaborate on that:

While we to similar things for things like set schema, here it has a functional relevance.


ALTER TRIGGER a5 ON table_name RENAME TO a9;


suggests that the trigger is now fired later from now on. Which obviously might not be the case, if one of the child triggers have had a different name.




I like your naming suggestions. I'm looking forward to test this patch when it applies at my end!


Regards
Arne

Commits

  1. Remove newly added useless assertion check

  2. Make ALTER TRIGGER RENAME consistent for partitioned tables

  3. Fix pg_dump for disabled triggers on partitioned tables

  4. Preserve firing-on state when cloning row triggers to partitions

  5. Fix ALTER TABLE .. ENABLE/DISABLE TRIGGER recursion

  6. Record parents of triggers

  7. Allow FOR EACH ROW triggers on partitioned tables