summaryrefslogtreecommitdiff
path: root/contrib/tablefunc/tablefunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tablefunc/tablefunc.c')
-rw-r--r--contrib/tablefunc/tablefunc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index 65a470114b..10ee8c76db 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -10,7 +10,7 @@
* And contributors:
* Nabil Sayegh <postgresql@e-trolley.de>
*
- * Copyright (c) 2002-2012, PostgreSQL Global Development Group
+ * Copyright (c) 2002-2014, PostgreSQL Global Development Group
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose, without fee, and without a written agreement
@@ -34,9 +34,11 @@
#include <math.h>
+#include "access/htup_details.h"
#include "catalog/pg_type.h"
-#include "funcapi.h"
#include "executor/spi.h"
+#include "funcapi.h"
+#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "utils/builtins.h"
@@ -1338,7 +1340,7 @@ build_tuplestore_recursively(char *key_fld,
for (i = 0; i < proc; i++)
{
/* initialize branch for this pass */
- appendStringInfo(&branchstr, "%s", branch);
+ appendStringInfoString(&branchstr, branch);
appendStringInfo(&chk_branchstr, "%s%s%s", branch_delim, branch, branch_delim);
/* get the next sql result tuple */