Re: pgsql: Propagate trigger arguments to partitions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Propagate trigger arguments to partitions
Date: 2019-07-10 07:01:22
Message-ID: 20190710070122.GE1031@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
buildfarm-fix-11.patch text/x-diff 785 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2019-07-10 12:51:03 pgsql: Assorted fixes for jsonpath documentation
Previous Message Michael Paquier 2019-07-10 06:17:05 pgsql: Fix variable initialization when using buffering build with GiST