mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04: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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user