Re: BUG #17817: DISABLE TRIGGER ALL on a partitioned table with foreign key fails

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: ahodgson@simkin.ca, pgsql-bugs@lists.postgresql.org
Date: 2023-03-03T15:50:40Z
Lists: pgsql-bugs

Attachments

I wrote:
> I can throw together a patch for what I was thinking of.

Basically just make the recursive steps match on tgparentid instead
of name, like this.

I wonder whether anyplace else is making a similar mistake?  Although
there's not much we will let you do to a foreign key trigger, so it
might not matter for anything else.

			regards, tom lane

Commits

  1. Avoid failure when altering state of partitioned foreign-key triggers.

  2. Fix ENABLE/DISABLE TRIGGER to handle recursion correctly