mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
Fix mistaken Assert in adjust_appendrel_attr_needed, per Greg Stark.
This commit is contained in:
parent
017f2d2f18
commit
bc8d164d06
@ -22,7 +22,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.142 2007/06/11 01:16:23 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.143 2007/07/12 18:27:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1288,8 +1288,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 */
|
||||
@ -1312,6 +1310,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;
|
||||
|
Loading…
Reference in New Issue
Block a user