22
22
*
23
23
*
24
24
* IDENTIFICATION
25
- * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.142 2007/06/11 01:16:23 tgl Exp $
25
+ * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.143 2007/07/12 18:27:01 tgl Exp $
26
26
*
27
27
*-------------------------------------------------------------------------
28
28
*/
@@ -1288,8 +1288,6 @@ adjust_appendrel_attr_needed(RelOptInfo *oldrel, AppendRelInfo *appinfo,
1288
1288
ListCell * lm ;
1289
1289
1290
1290
/* Create empty result array */
1291
- Assert (new_min_attr <=oldrel -> min_attr );
1292
- Assert (new_max_attr >=oldrel -> max_attr );
1293
1291
new_attr_needed = (Relids * )
1294
1292
palloc0 ((new_max_attr - new_min_attr + 1 )* sizeof (Relids ));
1295
1293
/* Process user attributes, with appropriate attno mapping */
@@ -1312,6 +1310,7 @@ adjust_appendrel_attr_needed(RelOptInfo *oldrel, AppendRelInfo *appinfo,
1312
1310
parent_attr ++ ;
1313
1311
}
1314
1312
/* Process system attributes, including whole-row references */
1313
+ Assert (new_min_attr <=oldrel -> min_attr );
1315
1314
for (parent_attr = oldrel -> min_attr ;parent_attr <=0 ;parent_attr ++ )
1316
1315
{
1317
1316
Relids attrneeded ;