Re: Listing triggers in partitions (was Re: Remove mention in docsthat foreign keys on partitioned tables) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Listing triggers in partitions (was Re: Remove mention in docsthat foreign keys on partitioned tables)
Date
Msg-id 20180628205220.6i2vosotleudfoqn@alvherre.pgsql
Whole thread Raw
In response to Re: Listing triggers in partitions (was Re: Remove mention in docsthat foreign keys on partitioned tables)  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Listing triggers in partitions (was Re: Remove mention in docsthat foreign keys on partitioned tables)
List 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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: cost_sort() improvements
Next
From: Peter Eisentraut
Date:
Subject: Re: partition tree inspection functions