Index: allpaths.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v
retrieving revision 1.154
diff -c -r1.154 allpaths.c
*** allpaths.c	4 Oct 2006 00:29:53 -0000	1.154
--- allpaths.c	28 Jan 2007 18:44:01 -0000
***************
*** 384,389 ****
--- 384,395 ----
  	}
  
  	/*
+ 	 * Set "raw tuples" count equal to "rows" for the appendrel; needed
+ 	 * because some places assume rel->tuples is valid for any baserel.
+ 	 */
+ 	rel->tuples = rel->rows;
+ 
+ 	/*
  	 * Finally, build Append path and install it as the only access path for
  	 * the parent rel.	(Note: this is correct even if we have zero or one
  	 * live subpath due to constraint exclusion.)
