]> granicus.if.org Git - postgresql/commit
Remove "fuzzy comparison" logic in qsort comparison function for
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Jun 2006 17:08:07 +0000 (17:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 7 Jun 2006 17:08:07 +0000 (17:08 +0000)
commitae0c8d09fb05d39c4f2c548bfc4720dadbd83532
tree41c52c469cf75c5207158592862ac6fb95f8957a
parentca9d50304ff664ec2fbf6ddf4cafe3d031c319cb
Remove "fuzzy comparison" logic in qsort comparison function for
choose_bitmap_and().  It was way too fuzzy --- per comment, it was meant to be
1% relative difference, but was actually coded as 0.01 absolute difference,
thus causing selectivities of say 0.001 and 0.000000000001 to be treated as
equal.  I believe this thinko explains Maxim Boguk's recent complaint.  While
we could change it to a relative test coded like compare_fuzzy_path_costs(),
there's a bigger problem here, which is that any fuzziness at all renders the
comparison function non-transitive, which could confuse qsort() to the point
of delivering completely wrong results.  So forget the whole thing and just
do an exact comparison.
src/backend/optimizer/path/indxpath.c