pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix assorted oversights in range selectivity estimation. 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix assorted oversights in range selectivity estimation. @ 2015-01-30 17:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2015-01-30 17:31 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/527ff8baf259263cc861b2058385d92829d1ba28 Modified Files -------------- src/backend/utils/adt/rangetypes_selfuncs.c | 50 ++++++++++++++++++--------- src/include/catalog/pg_operator.h | 4 +-- src/test/regress/expected/rangetypes.out | 32 +++++++++++++++++ src/test/regress/sql/rangetypes.sql | 4 +++ 4 files changed, 72 insertions(+), 18 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assorted oversights in range selectivity estimation. @ 2015-01-30 17:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2015-01-30 17:31 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/b6a164e5cb389a52b2187bbacdcdaab46e236418 Modified Files -------------- src/backend/utils/adt/rangetypes_selfuncs.c | 50 ++++++++++++++++++--------- src/include/catalog/pg_operator.h | 4 +-- src/test/regress/expected/rangetypes.out | 32 +++++++++++++++++ src/test/regress/sql/rangetypes.sql | 4 +++ 4 files changed, 72 insertions(+), 18 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assorted oversights in range selectivity estimation. @ 2015-01-30 17:31 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2015-01-30 17:31 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/3d660d33aab2f1eb98367a84eb2addf3e0969c05 Modified Files -------------- src/backend/utils/adt/rangetypes_selfuncs.c | 50 ++++++++++++++++++--------- src/include/catalog/pg_operator.h | 4 +-- src/test/regress/expected/rangetypes.out | 32 +++++++++++++++++ src/test/regress/sql/rangetypes.sql | 4 +++ 4 files changed, 72 insertions(+), 18 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2015-01-30 17:31 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-01-30 17:31 pgsql: Fix assorted oversights in range selectivity estimation. Tom Lane <tgl@sss.pgh.pa.us> 2015-01-30 17:31 pgsql: Fix assorted oversights in range selectivity estimation. Tom Lane <tgl@sss.pgh.pa.us> 2015-01-30 17:31 pgsql: Fix assorted oversights in range selectivity estimation. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox