diff options
Diffstat (limited to 'contrib/tablefunc')
-rw-r--r-- | contrib/tablefunc/expected/tablefunc.out | 1 | ||||
-rw-r--r-- | contrib/tablefunc/tablefunc.c | 8 | ||||
-rw-r--r-- | contrib/tablefunc/tablefunc.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/contrib/tablefunc/expected/tablefunc.out b/contrib/tablefunc/expected/tablefunc.out index 7ad4336ada..0437ecf90a 100644 --- a/contrib/tablefunc/expected/tablefunc.out +++ b/contrib/tablefunc/expected/tablefunc.out @@ -146,7 +146,6 @@ SELECT * FROM crosstab_out('SELECT rowid, attribute, val FROM ct where rowclass -- hash based crosstab -- create table cth(id serial, rowid text, rowdt timestamp, attribute text, val text); -NOTICE: CREATE TABLE will create implicit sequence "cth_id_seq" for serial column "cth.id" insert into cth values(DEFAULT,'test1','01 March 2003','temperature','42'); insert into cth values(DEFAULT,'test1','01 March 2003','test_result','PASS'); -- the next line is intentionally left commented and is therefore a "missing" attribute 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 */ diff --git a/contrib/tablefunc/tablefunc.h b/contrib/tablefunc/tablefunc.h index d9670f5401..a983bab2ee 100644 --- a/contrib/tablefunc/tablefunc.h +++ b/contrib/tablefunc/tablefunc.h @@ -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 |