On Mon, Jan 29, 2018 at 11:32:34AM +0000, Ian R. Campbell wrote:
> The second part of the confusion is that INSERT is not considered to be a row
> modification and will fire a BEFORE INSERT trigger on the parent table even
> when the data goes into a child (whereas UPDATE and DELETE will not fire a
> parent trigger).
Ian, that is not true based on my testing. Running that attached script
that I already posted shows:
test=> INSERT INTO parent VALUES (1, 'one');
NOTICE: Called by parent INSERT
INSERT 0 1
test=> INSERT INTO child VALUES (2, 'two');
--> NOTICE: Called by child INSERT
INSERT 0 1
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +