|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.157 2007/01/20 20:45:38 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.158 2007/01/28 18:50:40 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -393,6 +393,12 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, |
393 | 393 | } |
394 | 394 | } |
395 | 395 |
|
| 396 | +/* |
| 397 | + * Set "raw tuples" count equal to "rows" for the appendrel; needed |
| 398 | + * because some places assume rel->tuples is valid for any baserel. |
| 399 | + */ |
| 400 | +rel->tuples=rel->rows; |
| 401 | + |
396 | 402 | /* |
397 | 403 | * Finally, build Append path and install it as the only access path for |
398 | 404 | * the parent rel.(Note: this is correct even if we have zero or one |
|