aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeFunctionscan.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-03-16 00:31:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-03-16 00:31:55 +0000
commit23160139617f6cb998604c7324da2175f7409db5 (patch)
treecdd877b18be4f800499f4240c76aaed7759e0a2f /src/backend/executor/nodeFunctionscan.c
parent5981b9d03e724a54f3eac706c27056d601954a7f (diff)
downloadpostgresql-23160139617f6cb998604c7324da2175f7409db5.tar.gz
postgresql-23160139617f6cb998604c7324da2175f7409db5.zip
Clean up representation of function RTEs for functions returning RECORD.
The original coding stored the raw parser output (ColumnDef and TypeName nodes) which was ugly, bulky, and wrong because it failed to create any dependency on the referenced datatype --- and in fact would not track type renamings and suchlike. Instead store a list of column type OIDs in the RTE. Also fix up general failure of recordDependencyOnExpr to do anything sane about recording dependencies on datatypes. While there are many cases where there will be an indirect dependency (eg if an operator returns a datatype, the dependency on the operator is enough), we do have to record the datatype as a separate dependency in examples like CoerceToDomain. initdb forced because of change of stored rules.
Diffstat (limited to 'src/backend/executor/nodeFunctionscan.c')
-rw-r--r--src/backend/executor/nodeFunctionscan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/executor/nodeFunctionscan.c b/src/backend/executor/nodeFunctionscan.c
index 45cbc6c1fcb..494ac209a92 100644
--- a/src/backend/executor/nodeFunctionscan.c
+++ b/src/backend/executor/nodeFunctionscan.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeFunctionscan.c,v 1.37 2006/03/05 15:58:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeFunctionscan.c,v 1.38 2006/03/16 00:31:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -202,7 +202,9 @@ ExecInitFunctionScan(FunctionScan *node, EState *estate, int eflags)
}
else if (functypclass == TYPEFUNC_RECORD)
{
- tupdesc = BuildDescForRelation(rte->coldeflist);
+ tupdesc = BuildDescFromLists(rte->eref->colnames,
+ rte->funccoltypes,
+ rte->funccoltypmods);
}
else
{