postgresql/src/include/optimizer
Robert Haas b08df9cab7 Teach predtest.c about CHECK clauses to fix partitioning bugs.
In a CHECK clause, a null result means true, whereas in a WHERE clause
it means false.  predtest.c provided different functions depending on
which set of semantics applied to the predicate being proved, but had
no option to control what a null meant in the clauses provided as
axioms.  Add one.

Use that in the partitioning code when figuring out whether the
validation scan on a new partition can be skipped.  Rip out the
old logic that attempted (not very successfully) to compensate
for the absence of the necessary support in predtest.c.

Ashutosh Bapat and Robert Haas, reviewed by Amit Langote and
incorporating feedback from Tom Lane.

Discussion: http://postgr.es/m/CAFjFpReT_kq_uwU_B8aWDxR7jNGE=P0iELycdq5oupi=xSQTOw@mail.gmail.com
2017-06-14 13:13:11 -04:00
..
clauses.h Move targetlist SRF handling from expression evaluation to new executor node. 2017-01-18 13:40:27 -08:00
cost.h Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
geqo.h #ifdef out assorted unused GEQO code. 2017-06-04 13:34:05 -04:00
geqo_copy.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_gene.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_misc.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_mutation.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_pool.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_random.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_recombination.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geqo_selection.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
joininfo.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
orclauses.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pathnode.h Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
paths.h Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
placeholder.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
plancat.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
planmain.h Reduce semijoins with unique inner relations to plain inner joins. 2017-05-01 14:53:42 -04:00
planner.h Don't scan partitioned tables. 2017-03-21 09:48:04 -04:00
predtest.h Teach predtest.c about CHECK clauses to fix partitioning bugs. 2017-06-14 13:13:11 -04:00
prep.h Improve RLS planning by marking individual quals with security levels. 2017-01-18 12:58:20 -05:00
restrictinfo.h Improve RLS planning by marking individual quals with security levels. 2017-01-18 12:58:20 -05:00
subselect.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tlist.h Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
var.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00