aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/json.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-01-30 12:30:38 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-01-30 12:30:59 -0500
commit3d660d33aab2f1eb98367a84eb2addf3e0969c05 (patch)
tree0ddca80ebcf52c22e9abf25cf3f1363580339210 /src/backend/utils/adt/json.c
parent68fa75f3188c050ec62804f2bfacd3ea85404743 (diff)
downloadpostgresql-3d660d33aab2f1eb98367a84eb2addf3e0969c05.tar.gz
postgresql-3d660d33aab2f1eb98367a84eb2addf3e0969c05.zip
Fix assorted oversights in range selectivity estimation.
calc_rangesel() failed outright when comparing range variables to empty constant ranges with < or >=, as a result of missing cases in a switch. It also produced a bogus estimate for > comparison to an empty range. On top of that, the >= and > cases were mislabeled throughout. For nonempty constant ranges, they managed to produce the right answers anyway as a result of counterbalancing typos. Also, default_range_selectivity() omitted cases for elem <@ range, range &< range, and range &> range, so that rather dubious defaults were applied for these operators. In passing, rearrange the code in rangesel() so that the elem <@ range case is handled in a less opaque fashion. Report and patch by Emre Hasegeli, some additional work by me
Diffstat (limited to 'src/backend/utils/adt/json.c')
0 files changed, 0 insertions, 0 deletions