postgresql/src/test/modules
Tom Lane 65ce07e020 Teach optimizer's predtest.c more things about ScalarArrayOpExpr.
In particular, make it possible to prove/refute "x IS NULL" and
"x IS NOT NULL" predicates from a clause involving a ScalarArrayOpExpr
even when we are unable or unwilling to deconstruct the expression
into an AND/OR tree.  This avoids a former unexpected degradation of
plan quality when the size of an ARRAY[] expression or array constant
exceeded the arbitrary MAX_SAOP_ARRAY_SIZE limit.  For IS-NULL proofs,
we don't really care about the values of the individual array elements;
at most, we care whether there are any, and for some common cases we
needn't even know that.

The main user-visible effect of this is to let the optimizer recognize
applicability of partial indexes with "x IS NOT NULL" predicates to
queries with "x IN (array)" clauses in some cases where it previously
failed to recognize that.  The structure of predtest.c is such that a
bunch of related proofs will now also succeed, but they're probably
much less useful in the wild.

James Coleman, reviewed by David Rowley

Discussion: https://postgr.es/m/CAAaqYe8yKSvzbyu8w-dThRs9aTFMwrFxn_BkTYeXgjqe3CbNjg@mail.gmail.com
2019-03-01 17:14:17 -05:00
..
brin Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
commit_ts Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
dummy_seclabel Update copyright for 2019 2019-01-02 12:44:25 -05:00
snapshot_too_old Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
test_bloomfilter Update copyright for 2019 2019-01-02 12:44:25 -05:00
test_ddl_deparse Solve cross-version-upgrade testing problem induced by 1fb57af92. 2019-02-09 21:02:06 -05:00
test_extensions Simplify restriction handling of two-phase commit for temporary objects 2019-01-26 10:45:23 +09:00
test_parser Update copyright for 2019 2019-01-02 12:44:25 -05:00
test_pg_dump Add PGXS options to control TAP and isolation tests, take two 2018-12-03 09:27:35 +09:00
test_predtest Teach optimizer's predtest.c more things about ScalarArrayOpExpr. 2019-03-01 17:14:17 -05:00
test_rbtree Update copyright for 2019 2019-01-02 12:44:25 -05:00
test_rls_hooks Update copyright for 2019 2019-01-02 12:44:25 -05:00
test_shm_mq Update copyright for 2019 2019-01-02 12:44:25 -05:00
worker_spi Update copyright for 2019 2019-01-02 12:44:25 -05:00
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
README Add README in src/test and src/test/modules 2016-02-25 21:08:32 -03:00

README

Test extensions and libraries
=============================

src/test/modules contains PostgreSQL extensions that are primarily or entirely
intended for testing PostgreSQL and/or to serve as example code. The extensions
here aren't intended to be installed in a production server and aren't suitable
for "real work".

Most extensions have their own pg_regress tests or isolationtester specs. Some
are also used by tests elsewhere in the tree.

If you're adding new hooks or other functionality exposed as C-level API this
is where to add the tests for it.