Re: [PATCH] Fix trigger argument propagation to child partitions - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: [PATCH] Fix trigger argument propagation to child partitions
Date
Msg-id 20190709165915.cmoucycya3qecznv@development
Whole thread Raw
In response to [PATCH] Fix trigger argument propagation to child partitions  (Patrick McHardy <kaber@trash.net>)
Responses Re: [PATCH] Fix trigger argument propagation to child partitions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Tue, Jul 09, 2019 at 03:00:27PM +0200, Patrick McHardy wrote:
>The following patch fixes propagation of arguments to the trigger
>function to child partitions both when initially creating the trigger
>and when adding new partitions to a partitioned table.
>

Thanks for the report and bugfix. It seeem the parameters in row triggers
on partitioned tables never worked :-( For a moment I was wondering why it
shows on 11 and not 10 (based on the assumption you'd send a patch against
10 if it was affected), but 10 actually did not support row triggers on
partitioned tables.

The fix seems OK to me, although I see we're parsing tgargs in ruleutils.c
and that version (around line ~1050) uses fastgetattr instead of
heap_getattr, and checks the isnull parameter after the call. I guess we
should do the same thing here.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: range_agg
Next
From: Jesper Pedersen
Date:
Subject: Re: pg_receivewal documentation