From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Simon Riggs <simon@2ndquadrant.com>
Subject: Re: FOR EACH ROW triggers on partitioned tables
Date: Thu, 15 Feb 2018 16:25:54 +0900
Message-ID: <77d52cfc-76d4-91ea-da90-ff2dc2db6f6b@lab.ntt.co.jp> (raw)
In-Reply-To: <20180214212624.hm7of76flesodamf@alvherre.pgsql>
References: <20180214212624.hm7of76flesodamf@alvherre.pgsql>
On 2018/02/15 6:26, Alvaro Herrera wrote:
> Another option is to rethink this feature from the ground up: instead of
> cloning catalog rows for each children, maybe we should have the trigger
> lookup code, when running DML on the child relation (the partition),
> obtain trigger entries not only for the child relation itself but also
> for its parents recursively -- so triggers defined in the parent are
> fired for the partitions, too. I'm not sure what implications this has
> for constraint triggers.
>
> The behavior should be the same, except that you cannot modify the
> trigger (firing conditions, etc) on the partition individually -- it
> works at the level of the whole partitioned table instead.
Do you mean to fire these triggers only if the parent table (not a child
table/partition) is addressed in the DML, right? If the table directly
addressed in the DML is a partition whose parent has a row-level trigger,
then that trigger should not get fired I suppose.
Thanks,
Amit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: Langote_Amit_f8@lab.ntt.co.jp, alvherre@alvh.no-ip.org, robertmhaas@gmail.com, peter.eisentraut@2ndquadrant.com, simon@2ndquadrant.com
Subject: Re: FOR EACH ROW triggers on partitioned tables
In-Reply-To: <77d52cfc-76d4-91ea-da90-ff2dc2db6f6b@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox