summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2011-12-30 22:58:15 +0000
committerTom Lane2011-12-30 22:58:15 +0000
commit2ae2e9c00798685cd75ea0cc5120466bf2027b90 (patch)
tree01a62bd0f0394eea0baf8e2225d15c3e1cd45994
parentdca0a54717a8372cc88b0c187965a1add19ec7e3 (diff)
Revert "Remove troublesome Asserts in cost_mergejoin()."
This reverts commit ff68b256a533b398e3420750f34d161aeee4e099. The recent change to use -fexcess-precision=standard should make those Asserts safe, and does fix a test case that formerly crashed for me, so I think there's no need to have a cross-version difference in the code here.
-rw-r--r--src/backend/optimizer/path/costsize.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index efc49dad1ec..39c426a62fb 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -1925,6 +1925,9 @@ cost_mergejoin(MergePath *path, PlannerInfo *root, SpecialJoinInfo *sjinfo)
outerendsel = outer_rows / outer_path_rows;
innerendsel = inner_rows / inner_path_rows;
+ Assert(outerstartsel <= outerendsel);
+ Assert(innerstartsel <= innerendsel);
+
/* cost of source data */
if (outersortkeys) /* do we need to sort outer? */