Fix mistaken Assert in adjust_appendrel_attr_needed, per Greg Stark.

This commit is contained in:
Tom Lane 2007-07-12 18:27:09 +00:00
parent c7cca1c8f7
commit c1ac3df734

View File

@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.134 2006/10/04 00:29:55 momjian Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.134.2.1 2007/07/12 18:27:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1283,8 +1283,6 @@ adjust_appendrel_attr_needed(RelOptInfo *oldrel, AppendRelInfo *appinfo,
ListCell *lm;
/* Create empty result array */
Assert(new_min_attr <= oldrel->min_attr);
Assert(new_max_attr >= oldrel->max_attr);
new_attr_needed = (Relids *)
palloc0((new_max_attr - new_min_attr + 1) * sizeof(Relids));
/* Process user attributes, with appropriate attno mapping */
@ -1307,6 +1305,7 @@ adjust_appendrel_attr_needed(RelOptInfo *oldrel, AppendRelInfo *appinfo,
parent_attr++;
}
/* Process system attributes, including whole-row references */
Assert(new_min_attr <= oldrel->min_attr);
for (parent_attr = oldrel->min_attr; parent_attr <= 0; parent_attr++)
{
Relids attrneeded;