mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user