*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.133 2007/02/23 21:59:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/plan/setrefs.c,v 1.134 2007/04/06 22:57:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
/*
* In the flat rangetable, we zero out substructure pointers that are
* not needed by the executor; this reduces the storage space and
- * copying cost for cached plans.
+ * copying cost for cached plans. We keep only the alias and eref
+ * Alias fields, which are needed by EXPLAIN.
*/
foreach(lc, rtable)
{
newrte = (RangeTblEntry *) palloc(sizeof(RangeTblEntry));
memcpy(newrte, rte, sizeof(RangeTblEntry));
- /* zap unneeded sub-structure (we keep only the eref Alias) */
+ /* zap unneeded sub-structure */
newrte->subquery = NULL;
newrte->funcexpr = NULL;
newrte->funccoltypes = NIL;
newrte->funccoltypmods = NIL;
newrte->values_lists = NIL;
newrte->joinaliasvars = NIL;
- newrte->alias = NULL;
glob->finalrtable = lappend(glob->finalrtable, newrte);
}