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: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, 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-28 20:52:20
Message-ID: 20180628205220.6i2vosotleudfoqn@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-Jun-28, Peter Eisentraut wrote:

> On 6/27/18 23:01, Alvaro Herrera wrote:
> > Another angle is that we're already in beta3 and there may be concerns
> > about altering catalog definition this late in the cycle. Anybody?
> > Maybe psql can just match tgisinternal triggers by name, and if one
> > match occurs then we assume it's a clone that should be listed as a
> > partition trigger.
>
> 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.

I admit I'm inclined to go this route mostly because it's simpler.

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

Attachment Content-Type Size
show-partition-triggers.patch text/plain 898 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-06-28 21:19:17 Re: partition tree inspection functions
Previous Message Peter Geoghegan 2018-06-28 19:30:01 Re: cost_sort() improvements