From a0bf885f9eaccadd23b766ecbc064f17f06ae883 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 12 Dec 2002 15:49:42 +0000 Subject: Phase 2 of read-only-plans project: restructure expression-tree nodes so that all executable expression nodes inherit from a common supertype Expr. This is somewhat of an exercise in code purity rather than any real functional advance, but getting rid of the extra Oper or Func node formerly used in each operator or function call should provide at least a little space and speed improvement. initdb forced by changes in stored-rules representation. --- src/backend/executor/execTuples.c | 98 ++++----------------------------------- 1 file changed, 10 insertions(+), 88 deletions(-) (limited to 'src/backend/executor/execTuples.c') diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index f5a6863b1a..eecc108fb1 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.61 2002/12/05 15:50:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.62 2002/12/12 15:49:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -576,93 +576,15 @@ ExecTypeFromTL(List *targetList, bool hasoid) foreach(tlitem, targetList) { TargetEntry *tle = lfirst(tlitem); - Resdom *resdom; - Oid restype; - - if (tle->resdom != NULL) - { - resdom = tle->resdom; - restype = resdom->restype; - - TupleDescInitEntry(typeInfo, - resdom->resno, - resdom->resname, - restype, - resdom->restypmod, - 0, - false); - -#ifdef NOT_USED - ExecSetTypeInfo(resdom->resno - 1, - typeInfo, - (Oid) restype, - resdom->resno, - resdom->reslen, - NameStr(*resdom->resname), - get_typbyval(restype), - get_typalign(restype)); -#endif - } - else - { - /* XXX this branch looks fairly broken ... tgl 12/2000 */ - Resdom *fjRes; - List *fjTlistP; - List *fjList = lfirst(tlitem); - -#ifdef SETS_FIXED - TargetEntry *tle; - Fjoin *fjNode = ((TargetEntry *) lfirst(fjList))->fjoin; - - tle = fjNode->fj_innerNode; /* ??? */ -#endif - fjRes = tle->resdom; - restype = fjRes->restype; - - TupleDescInitEntry(typeInfo, - fjRes->resno, - fjRes->resname, - restype, - fjRes->restypmod, - 0, - false); -#ifdef NOT_USED - ExecSetTypeInfo(fjRes->resno - 1, - typeInfo, - (Oid) restype, - fjRes->resno, - fjRes->reslen, - (char *) fjRes->resname, - get_typbyval(restype), - get_typalign(restype)); -#endif - - foreach(fjTlistP, lnext(fjList)) - { - TargetEntry *fjTle = lfirst(fjTlistP); - - fjRes = fjTle->resdom; - - TupleDescInitEntry(typeInfo, - fjRes->resno, - fjRes->resname, - restype, - fjRes->restypmod, - 0, - false); - -#ifdef NOT_USED - ExecSetTypeInfo(fjRes->resno - 1, - typeInfo, - (Oid) fjRes->restype, - fjRes->resno, - fjRes->reslen, - (char *) fjRes->resname, - get_typbyval(fjRes->restype), - get_typalign(fjRes->restype)); -#endif - } - } + Resdom *resdom = tle->resdom; + + TupleDescInitEntry(typeInfo, + resdom->resno, + resdom->resname, + resdom->restype, + resdom->restypmod, + 0, + false); } return typeInfo; -- cgit v1.2.1