projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3b7544
)
Repair oversight in creation of "append relations": we should set up
author
Tom Lane
<
[email protected]
>
Sun, 28 Jan 2007 18:50:48 +0000
(18:50 +0000)
committer
Tom Lane
<
[email protected]
>
Sun, 28 Jan 2007 18:50:48 +0000
(18:50 +0000)
rel->tuples as well as rel->rows, since some estimation functions expect both
to be valid in every baserel. Per report from Dave Dutcher.
src/backend/optimizer/path/allpaths.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/optimizer/path/allpaths.c
b/src/backend/optimizer/path/allpaths.c
index 1d54c46b747916d20479e01932f5e36430695a9b..4541bf80039b754d723a464f6356c35e394800f7 100644
(file)
--- a/
src/backend/optimizer/path/allpaths.c
+++ b/
src/backend/optimizer/path/allpaths.c
@@
-383,6
+383,12
@@
set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
}
}
+ /*
+ * 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