]> granicus.if.org Git - postgresql/commit
Clean up representation of function RTEs for functions returning RECORD.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Mar 2006 00:31:55 +0000 (00:31 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Mar 2006 00:31:55 +0000 (00:31 +0000)
commit23160139617f6cb998604c7324da2175f7409db5
treecdd877b18be4f800499f4240c76aaed7759e0a2f
parent5981b9d03e724a54f3eac706c27056d601954a7f
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.
13 files changed:
src/backend/access/common/tupdesc.c
src/backend/catalog/dependency.c
src/backend/executor/nodeFunctionscan.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_relation.c
src/backend/utils/adt/ruleutils.c
src/include/access/tupdesc.h
src/include/catalog/catversion.h
src/include/nodes/parsenodes.h