pgsql: Restore correct btree preprocessing of "indexedcol IS NULL" cond

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Restore correct btree preprocessing of "indexedcol IS NULL" cond
Date: 2011-06-29 23:47:24
Message-ID: E1Qc4Tc-00040R-NH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Restore correct btree preprocessing of "indexedcol IS NULL" conditions.

Such a condition is unsatisfiable in combination with any other type of
btree-indexable condition (since we assume btree operators are always
strict). 8.3 and 8.4 had an explicit test for this, which I removed in
commit 29c4ad98293e3c5cb3fcdd413a3f4904efff8762, mistakenly thinking that
the case would be subsumed by the more general handling of IS (NOT) NULL
added in that patch. Put it back, and improve the comments about it, and
add a regression test case.

Per bug #6079 from Renat Nasyrov, and analysis by Dean Rasheed.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bbfcc71496051651accb71540130c6d36377a692

Modified Files
--------------
src/backend/access/nbtree/nbtutils.c | 17 +++++++++-
src/test/regress/expected/create_index.out | 48 ++++++++++++++++++++++++++++
src/test/regress/sql/create_index.sql | 8 +++++
3 files changed, 71 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2011-06-29 23:50:11 pgsql: Fix outdated comment
Previous Message Michael Paquier 2011-06-29 23:11:33 Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed