diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-06 20:44:32 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-06 20:44:32 +0000 |
commit | dcb2bda9b7042dbf43f876c94ebf35d951de10e9 (patch) | |
tree | 0d9ab8f54b720f105c6f3e05530ba69b623d55c2 /src/include/nodes/execnodes.h | |
parent | 40001705353845ea157ea081355bd0eeedd2673a (diff) | |
download | postgresql-dcb2bda9b7042dbf43f876c94ebf35d951de10e9.tar.gz postgresql-dcb2bda9b7042dbf43f876c94ebf35d951de10e9.zip |
Improve plpgsql's ability to cope with rowtypes containing dropped columns,
by supporting conversions in places that used to demand exact rowtype match.
Since this issue is certain to come up elsewhere (in fact, already has,
in ExecEvalConvertRowtype), factor out the support code into new core
functions for tuple conversion. I chose to put these in a new source
file since heaptuple.c is already overly long.
Heavily revised version of a patch by Pavel Stehule.
Diffstat (limited to 'src/include/nodes/execnodes.h')
-rw-r--r-- | src/include/nodes/execnodes.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index b74db12afcb..1b60bda4691 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.205 2009/06/11 14:49:11 momjian Exp $ + * $PostgreSQL: pgsql/src/include/nodes/execnodes.h,v 1.206 2009/08/06 20:44:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -750,11 +750,9 @@ typedef struct ConvertRowtypeExprState 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 */ - bool *inisnull; - Datum *outvalues; /* workspace for constructing result */ - bool *outisnull; + /* use "struct" so we needn't include tupconvert.h here */ + struct TupleConversionMap *map; + bool initialized; } ConvertRowtypeExprState; /* ---------------- |