Fix partition pruning with IS [NOT] NULL clauses
Alvaro Herrera <alvherre@alvh.no-ip.org>
Fix partition pruning with IS [NOT] NULL clauses The original code was unable to prune partitions that could not possibly contain NULL values, when the query specified less than all columns in a multicolumn partition key. Reorder the if-tests so that it is, and add more commentary and regression tests. Reported-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> Co-authored-by: Dilip Kumar <dilipbalaut@gmail.com> Co-authored-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> Reviewed-by: amul sul <sulamul@gmail.com> Discussion: https://postgr.es/m/CAFjFpRc7qjLUfXLVBBC_HAnx644sjTYM=qVoT3TJ840HPbsTXw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/partitioning/partprune.c | modified | +42 −36 |
| src/test/regress/expected/partition_prune.out | modified | +41 −0 |
| src/test/regress/sql/partition_prune.sql | modified | +7 −0 |
Discussion
- partition pruning doesn't work with IS NULL clause in multikey range partition case 16 messages · 2018-07-11 → 2018-07-17