Re: pgsql: Propagate trigger arguments to partitions - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Propagate trigger arguments to partitions
Date
Msg-id 20190710070122.GE1031@paquier.xyz
Whole thread Raw
In response to pgsql: Propagate trigger arguments to partitions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Propagate trigger arguments to partitions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-committers
Hi Alvaro,

On Tue, Jul 09, 2019 at 09:23:45PM +0000, Alvaro Herrera wrote:
> Propagate trigger arguments to partitions
>
> We were creating the cloned triggers with an empty list of arguments,
> losing the ones that had been specified by the user when creating the
> trigger in the partitioned table.  Repair.
>
> This was forgotten in commit 86f575948c77.

This commit has broken the buildfarm on REL_11_STABLE for a couple of
animals:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2019-07-10%2006%3A27%3A02

/home/ec2-user/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/commands/tablecmds.c:
In function ‘CloneRowTriggersToPartition’:
/home/ec2-user/bf/root/REL_11_STABLE/pgsql.build/../pgsql/src/backend/commands/tablecmds.c:15283:4:
error: ‘for’ loop initial declarations are only allowed in C99 mode
    for (int i = 0; i < trigForm->tgnargs; i++)

This gets fixed with the attached.  I would personally keep the code
consistent for v12 and HEAD for this code path, but I am fine to let
you decide the way you prefer.
--
Michael

Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix variable initialization when using buffering build withGiST
Next
From: Alexander Korotkov
Date:
Subject: pgsql: Assorted fixes for jsonpath documentation