Re: Listing triggers in partitions (was Re: Remove mention in docs that foreign keys on partitioned tables)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Listing triggers in partitions (was Re: Remove mention in docs that foreign keys on partitioned tables)
Date: 2018-06-29 16:06:51
Message-ID: 20180629160651.s7ilhnvrwnkxtbpy@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-Jun-29, Amit Langote wrote:

> On 2018/06/29 6:23, Peter Eisentraut wrote:
> > On 6/28/18 22:52, Alvaro Herrera wrote:
> >>> Couldn't psql chase the pg_depend links to find inherited triggers?
> >>
> >> Yeah, I thought this would be exceedingly ugly, but apparently it's not
> >> *that* bad -- see the attached patch, which relies on the fact that
> >> triggers don't otherwise depend on other triggers. We don't use this
> >> technique elsewhere in psql though.
> >
> > Yeah, relying on pg_depend to detect relationships between catalog
> > objects is a bit evil. We do use this for detecting sequences linked to
> > tables, which also has its share of problems. Ideally, there would be a
> > column in pg_trigger, perhaps, that makes this link explicit. But we
> > are looking here for a solution without catalog changes, I believe.
>
> +1 if that gets the job done.

Okay, pushed that way.

We can redo this if/when we add support for cloning BEFORE row triggers,
which are going to need the trigger link info, I suspect.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2018-06-29 16:15:57 Re: Utilisation of get_page_from_raw() in pageinspect
Previous Message Alvaro Herrera 2018-06-29 15:52:58 Re: Server crashed with "TRAP: unrecognized TOAST vartag("1", File: "heaptuple.c", Line: 1490)"