]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Restore correct btree preprocessing of "indexedcol IS NULL" conditions.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Jun 2011 23:47:07 +0000 (19:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 29 Jun 2011 23:47:07 +0000 (19:47 -0400)
commitbbfcc71496051651accb71540130c6d36377a692
tree53a8d4aa14af1e827f81be410155050301669a2d
parentcbfd82aad252fd86b560a7b7c3d87260a34a595e
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.
src/backend/access/nbtree/nbtutils.c
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql