aboutsummaryrefslogtreecommitdiff
path: root/src/include/nodes/execnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-12-11 23:26:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-12-11 23:26:51 +0000
commit12b1b5d837b5ce1c07ee3535e74e4cc3039063d6 (patch)
tree1ef0ecc2ccfba9a8a33f0b20ef31533b499cbdba /src/include/nodes/execnodes.h
parentfd536dd257b12a8b1abf8d744d8a3688e1db126b (diff)
downloadpostgresql-12b1b5d837b5ce1c07ee3535e74e4cc3039063d6.tar.gz
postgresql-12b1b5d837b5ce1c07ee3535e74e4cc3039063d6.zip
Instead of supposing (wrongly, in the general case) that the rowtype
of an inheritance child table is binary-compatible with the rowtype of its parent, invent an expression node type that does the conversion correctly. Fixes the new bug exhibited by Kris Shannon as well as a lot of old bugs that would only show up when using multiple inheritance or after altering the parent table.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r--src/include/nodes/execnodes.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 07176952032..7b5a75868ba 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.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/nodes/execnodes.h,v 1.120 2004/10/07 18:38:51 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.121 2004/12/11 23:26:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -579,6 +579,23 @@ typedef struct FieldStoreState
} FieldStoreState;
/* ----------------
+ * ConvertRowtypeExprState node
+ * ----------------
+ */
+typedef struct ConvertRowtypeExprState
+{
+ ExprState xprstate;
+ ExprState *arg; /* input tuple value */
+ TupleDesc indesc; /* tupdesc for source rowtype */
+ TupleDesc outdesc; /* tupdesc for result rowtype */
+ AttrNumber *attrMap; /* indexes of input fields, or 0 for null */
+ Datum *invalues; /* workspace for deconstructing source */
+ char *innulls;
+ Datum *outvalues; /* workspace for constructing result */
+ char *outnulls;
+} ConvertRowtypeExprState;
+
+/* ----------------
* CaseExprState node
* ----------------
*/