postgresql/src
Tom Lane 3d660d33aa 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
2015-01-30 12:30:59 -05:00
..
backend Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:59 -05:00
bin Allow pg_dump to use jobs and serializable transactions together. 2015-01-30 08:57:24 -06:00
common Fix libpq's behavior when /etc/passwd isn't readable. 2015-01-11 12:35:44 -05:00
include Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:59 -05:00
interfaces Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
makefiles Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
pl Fix volatile-safety issue in pltcl_SPI_execute_plan(). 2015-01-26 12:18:25 -05:00
port Remove no-longer-referenced src/port/gethostname.c. 2015-01-24 12:13:57 -05:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:59 -05:00
timezone Update copyright for 2015 2015-01-06 11:43:47 -05:00
tools tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Install shared libraries also in bin on cygwin, mingw 2015-01-18 22:36:40 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00