summaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-30 23:59:46 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-30 23:59:46 +0000
commit7bacf2befaa5e708ad924dfc7f37844a0013e06f (patch)
tree30d436a390835bd49d0be011b2d9e2dbc843ed97 /src/include/nodes/execnodes.h
parent9c279355fbf332dbf6dcebbe10d38e10503bf4dd (diff)
Add expected tuple descriptor to ReturnSetInfo information for table
functions, per suggestion from John Gray and Joe Conway. Also, fix plpgsql RETURN NEXT to verify that returned values match the expected tupdesc.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 3081a6842eb..2b18e70e42b 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.73 2002/08/30 00:28:41 tgl Exp $
+ * $Id: execnodes.h,v 1.74 2002/08/30 23:59:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -147,12 +147,16 @@ typedef enum
typedef struct ReturnSetInfo
{
NodeTag type;
+ /* values set by caller: */
ExprContext *econtext; /* context function is being called in */
+ TupleDesc expectedDesc; /* tuple descriptor expected by caller */
int allowedModes; /* bitmask: return modes caller can handle */
- SetFunctionReturnMode returnMode; /* actual return mode */
+ /* result status from function (but pre-initialized by caller): */
+ SetFunctionReturnMode returnMode; /* actual return mode */
ExprDoneCond isDone; /* status for ValuePerCall mode */
- Tuplestorestate *setResult; /* return object for Materialize mode */
- TupleDesc setDesc; /* descriptor for Materialize mode */
+ /* fields filled by function in Materialize return mode: */
+ Tuplestorestate *setResult; /* holds the complete returned tuple set */
+ TupleDesc setDesc; /* actual descriptor for returned tuples */
} ReturnSetInfo;
/* ----------------