diff options
| author | Tom Lane | 2004-04-01 21:28:47 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-04-01 21:28:47 +0000 |
| commit | 375369acd1c621bdc683c58bc9c31d4e79d14849 (patch) | |
| tree | f29974842cea4105c92da6031bac736ddf5f833a /src/include/nodes | |
| parent | 8590a62b75d3dba24609eb46b34fac13ed881d9e (diff) | |
Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums. This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables. However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well. Per my proposal of a few days ago.
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/execnodes.h | 13 | ||||
| -rw-r--r-- | src/include/nodes/nodes.h | 3 | ||||
| -rw-r--r-- | src/include/nodes/primnodes.h | 7 |
3 files changed, 17 insertions, 6 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 440fcc4d576..8a0fbf7be0f 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.114 2004/03/17 20:48:42 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.115 2004/04/01 21:28:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -564,6 +564,17 @@ typedef struct SubPlanState } SubPlanState; /* ---------------- + * FieldSelectState node + * ---------------- + */ +typedef struct FieldSelectState +{ + ExprState xprstate; + ExprState *arg; /* input expression */ + TupleDesc argdesc; /* tupdesc for most recent input */ +} FieldSelectState; + +/* ---------------- * CaseExprState node * ---------------- */ diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 5c34b8d8559..d5d4f0832a7 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.151 2004/03/17 20:48:43 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.152 2004/04/01 21:28:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -141,6 +141,7 @@ typedef enum NodeTag T_ScalarArrayOpExprState, T_BoolExprState, T_SubPlanState, + T_FieldSelectState, T_CaseExprState, T_CaseWhenState, T_ArrayExprState, diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index d94196d7400..567310fa1c3 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -10,7 +10,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.96 2004/03/17 20:48:43 tgl Exp $ + * $PostgreSQL: pgsql/src/include/nodes/primnodes.h,v 1.97 2004/04/01 21:28:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -525,9 +525,8 @@ typedef struct SubPlan * FieldSelect * * FieldSelect represents the operation of extracting one field from a tuple - * value. At runtime, the input expression is expected to yield a Datum - * that contains a pointer-to-TupleTableSlot. The specified field number - * is extracted and returned as a Datum. + * value. At runtime, the input expression is expected to yield a rowtype + * Datum. The specified field number is extracted and returned as a Datum. * ---------------- */ |
