postgresql/src/backend
Tom Lane 99419d36f2 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 20:59:53 +00:00
..
access Make pg_stop_backup's reporting a bit more verbose in hopes of making 2010-02-25 02:17:50 +00:00
bootstrap Create a "relation mapping" infrastructure to support changing the relfilenodes 2010-02-07 20:48:13 +00:00
catalog Clean up handling of XactReadOnly and RecoveryInProgress checks. 2010-02-20 21:24:02 +00:00
commands Add an OR REPLACE option to CREATE LANGUAGE. 2010-02-23 22:51:43 +00:00
executor Clean up handling of XactReadOnly and RecoveryInProgress checks. 2010-02-20 21:24:02 +00:00
foreign Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
lib Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
libpq Add configuration parameter ssl_renegotiation_limit to control 2010-02-25 13:26:16 +00:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Add an OR REPLACE option to CREATE LANGUAGE. 2010-02-23 22:51:43 +00:00
optimizer Allow predicate_refuted_by() to deduce that NOT A refutes A. 2010-02-25 20:59:53 +00:00
parser Add an OR REPLACE option to CREATE LANGUAGE. 2010-02-23 22:51:43 +00:00
po Translation updates for 9.0alpha4 2010-02-19 00:40:05 +00:00
port Another typo fix. 2010-02-17 05:51:40 +00:00
postmaster Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
regex Change regexp engine's ccondissect/crevdissect routines to perform DFA 2010-02-01 02:45:29 +00:00
replication Fix streaming replication starting at the very first WAL segment. 2010-02-25 07:31:40 +00:00
rewrite Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
snowball Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
storage Adjust pg_fsync_writethrough so that it will set errno when failing 2010-02-22 15:26:14 +00:00
tcop Clean up handling of XactReadOnly and RecoveryInProgress checks. 2010-02-20 21:24:02 +00:00
tsearch When estimating the selectivity of an inequality "column > constant" or 2010-01-04 02:44:40 +00:00
utils Add C comment that do_to_timestamp() lacks error checking. 2010-02-25 18:36:14 +00:00
Makefile Well, the systemtap guys moved the goalposts again: with the latest version, 2010-01-20 23:12:03 +00:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
nls.mk Convert the core lexer and parser into fully reentrant code, by making use 2009-07-13 02:02:20 +00:00