Revert "Remove troublesome Asserts in cost_mergejoin()."
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Dec 2011 22:58:15 +0000 (17:58 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Dec 2011 22:58:15 +0000 (17:58 -0500)
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.

src/backend/optimizer/path/costsize.c

index efc49dad1ec50ffaa1be4e77b8a02285824dd59d..39c426a62fba73ec617d780870c3869c331e1933 100644 (file)
@@ -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? */