postgresql/src
Tom Lane a7ac5c64fd Allow predicate_refuted_by() to deduce that NOT A refutes A.
We had originally made the stronger assumption that NOT A refutes any B
if B implies A, but this fails in three-valued logic, because we need to
prove B is false not just that it's not true.  However the logic does
go through if B is equal to A.

Recognizing this limited case is enough to handle examples that arise when
we have simplified "bool_var = true" or "bool_var = false" to just "bool_var"
or "NOT bool_var".  If we had not done that simplification then the
btree-operator proof logic would have been able to prove that the expressions
were contradictory, but only for identical expressions being compared to the
constants; so handling identical A and B covers all the same cases.

The motivation for doing this is to avoid unexpected asymmetrical behavior
when a partitioned table uses a boolean partitioning column, as in today's
gripe from Dominik Sander.

Back-patch to 8.2, which is as far back as predicate_refuted_by attempts to
do anything at all with NOTs.
2010-02-25 21:00:03 +00:00
..
backend Allow predicate_refuted_by() to deduce that NOT A refutes A. 2010-02-25 21:00:03 +00:00
bin Fix memory leakage introduced into print_aligned_text by 8.4 changes 2010-01-30 18:59:58 +00:00
include Alter the configure script to fail immediately if the C compiler does not 2010-01-07 00:25:18 +00:00
interfaces Backported fix for protecting ecpg against applications freeing strings to 8.4. 2010-01-08 09:22:44 +00:00
makefiles Allow out-of-tree builds on mingw and cygwin 2009-01-05 09:27:20 +00:00
pl Volatile-ize all five places where we expect a PG_TRY block to restore 2010-02-18 23:50:12 +00:00
port revert prior patch to fsync directories until portability problems exposed by build farm can be sorted out 2010-02-16 00:01:35 +00:00
template Tweak configure to attempt to add -qnoansialias to CFLAGS whenever running 2009-02-11 20:02:40 +00:00
test Fix ExecEvalArrayRef to pass down the old value of the array element or slice 2010-02-18 18:41:55 +00:00
timezone Update time zone data files to tzdata release 2009s: DST law changes in 2009-12-09 00:35:59 +00:00
tools fsync test files 2009-09-21 20:21:02 +00:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:06 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00: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 Add the possibility to specify an explicit validator function for foreign-data 2009-02-24 10:06:36 +00:00
Makefile.global.in Fix the makefiles to fail cleanly if Perl is needed but not present. This 2009-06-23 03:46:00 +00:00
Makefile.shlib Allow out-of-tree builds on mingw and cygwin 2009-01-05 09:27:20 +00:00
nls-global.mk Do not msgmerge against /dev/null; merge against the pot file itself 2009-01-20 09:58:50 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00