aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-07-10 09:01:28 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-07-10 09:13:50 -0400
commit2ede93de9e80f0f39276c0afabf1621d21180370 (patch)
treebb6b3b738f27dc39f539fbe9b56d0025c0889db8
parent1cde7fe84a479113127596e46e070f07ac6f09d0 (diff)
downloadpostgresql-2ede93de9e80f0f39276c0afabf1621d21180370.tar.gz
postgresql-2ede93de9e80f0f39276c0afabf1621d21180370.zip
Fix compile failure
REL_11_STABLE's configure does not select C99 mode by default, so using C99 block initializer broke the build for some compilers. Revert to C89 in that branch. Author: Michaƫl Paquier Discussion: https://postgr.es/m/20190710070122.GE1031@paquier.xyz
-rw-r--r--src/backend/commands/tablecmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 5fbe7242c42..70bbe052e19 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -15271,6 +15271,7 @@ CloneRowTriggersToPartition(Relation parent, Relation partition)
if (trigForm->tgnargs > 0)
{
char *p;
+ int i;
value = heap_getattr(tuple, Anum_pg_trigger_tgargs,
RelationGetDescr(pg_trigger), &isnull);
@@ -15280,7 +15281,7 @@ CloneRowTriggersToPartition(Relation parent, Relation partition)
p = (char *) VARDATA_ANY(DatumGetByteaPP(value));
- for (int i = 0; i < trigForm->tgnargs; i++)
+ for (i = 0; i < trigForm->tgnargs; i++)
{
trigargs = lappend(trigargs, makeString(pstrdup(p)));
p += strlen(p) + 1;