From ad161bcc8a3792d18ef2f3ebe66bb1e22d42b6f2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 6 Apr 2005 16:34:07 +0000 Subject: Merge Resdom nodes into TargetEntry nodes to simplify code and save a few palloc's. I also chose to eliminate the restype and restypmod fields entirely, since they are redundant with information stored in the node's contained expression; re-examining the expression at need seems simpler and more reliable than trying to keep restype/restypmod up to date. initdb forced due to change in contents of stored rules. --- src/backend/executor/execTuples.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/backend/executor/execTuples.c') diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 7941cebad6b..1c82a3b64be 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execTuples.c,v 1.86 2005/03/17 15:25:51 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execTuples.c,v 1.87 2005/04/06 16:34:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -784,15 +784,14 @@ ExecTypeFromTLInternal(List *targetList, bool hasoid, bool skipjunk) foreach(l, targetList) { TargetEntry *tle = lfirst(l); - Resdom *resdom = tle->resdom; - if (skipjunk && resdom->resjunk) + if (skipjunk && tle->resjunk) continue; TupleDescInitEntry(typeInfo, cur_resno++, - resdom->resname, - resdom->restype, - resdom->restypmod, + tle->resname, + exprType((Node *) tle->expr), + exprTypmod((Node *) tle->expr), 0); } -- cgit v1.2.3