summaryrefslogtreecommitdiff
path: root/src/include/executor/functions.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-10-07 18:38:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-10-07 18:38:51 +0000
commita8487e15ed91c10bdbba1096c6e941c6ecb8b11a (patch)
tree03bad7b5e08fc0e7762b273685acc3902139dc9b /src/include/executor/functions.h
parent6d46ea25f2131b34c1983a171e45041ba93390e0 (diff)
Fix problems with SQL functions returning rowtypes that have dropped
columns. The returned tuple needs to have appropriate NULL columns inserted so that it actually matches the declared rowtype. It seemed convenient to use a JunkFilter for this, so I made some cleanups and simplifications in the JunkFilter code to allow it to support this additional functionality. (That in turn exposed a latent bug in nodeAppend.c, which is that it was returning a tuple slot whose descriptor didn't match its data.) Also, move check_sql_fn_retval out of pg_proc.c and into functions.c, where it seems to more naturally belong.
Diffstat (limited to 'src/include/executor/functions.h')
-rw-r--r--src/include/executor/functions.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h
index 5701d62056e..5c20f47b101 100644
--- a/src/include/executor/functions.h
+++ b/src/include/executor/functions.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/functions.h,v 1.22 2004/08/29 04:13:06 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/executor/functions.h,v 1.23 2004/10/07 18:38:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,7 +15,13 @@
#define FUNCTIONS_H
#include "fmgr.h"
+#include "nodes/execnodes.h"
+
extern Datum fmgr_sql(PG_FUNCTION_ARGS);
+extern bool check_sql_fn_retval(Oid rettype, char fn_typtype,
+ List *queryTreeList,
+ JunkFilter **junkFilter);
+
#endif /* FUNCTIONS_H */