postgresql/contrib
Tom Lane 12cb7ea599 Repair bogus EPQ plans generated for postgres_fdw foreign joins.
postgres_fdw's postgresGetForeignPlan() assumes without checking that the
outer_plan it's given for a join relation must have a NestLoop, MergeJoin,
or HashJoin node at the top.  That's been wrong at least since commit
4bbf6edfb (which could cause insertion of a Sort node on top) and it seems
like a pretty unsafe thing to Just Assume even without that.

Through blind good fortune, this doesn't seem to have any worse
consequences today than strange EXPLAIN output, but it's clearly trouble
waiting to happen.

To fix, test the node type explicitly before touching Join-specific
fields, and avoid jamming the new tlist into a node type that can't
do projection.  Export a new support function from createplan.c
to avoid building low-level knowledge about the latter into FDWs.

Back-patch to 9.6 where the faulty coding was added.  Note that the
associated regression test cases don't show any changes before v11,
apparently because the tests back-patched with 4bbf6edfb don't actually
exercise the problem case before then (there's no top-level Sort
in those plans).

Discussion: https://postgr.es/m/8946.1544644803@sss.pgh.pa.us
2018-12-12 16:08:30 -05:00
..
adminpack adminpack: Revoke EXECUTE on pg_logfile_rotate() 2018-05-07 10:10:45 -04:00
auth_delay Update copyright for 2016 2016-01-02 14:19:48 -05:00
auto_explain Allow auto_explain.log_min_duration to go up to INT_MAX. 2018-02-23 14:39:20 -05:00
bloom Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:13 -04:00
btree_gin Make contrib regression tests safe for Danish locale. 2016-07-21 16:52:35 -04:00
btree_gist Improve stability of recently-added regression test case. 2018-10-16 12:01:19 -04:00
chkpass Avoid returning undefined bytes in chkpass_in(). 2015-02-14 12:20:56 -05:00
citext Repair damage done by citext--1.1--1.2.sql. 2016-07-26 15:32:57 -04:00
cube Enforce cube dimension limit in all cube construction functions 2018-08-31 20:22:39 +03:00
dblink Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
dict_int Update copyright for 2016 2016-01-02 13:33:40 -05:00
dict_xsyn Update copyright for 2016 2016-01-02 13:33:40 -05:00
earthdistance Fix earthdistance test suite function name typo. 2018-07-29 12:02:10 -07:00
file_fdw Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
fuzzystrmatch Update fuzzystrmatch extension for parallel query. 2016-06-07 11:26:41 -04:00
hstore Fix hstore hash function for empty hstores upgraded from 8.4. 2018-11-24 21:17:09 +00:00
hstore_plperl Still further rethinking of build changes for macOS Mojave. 2018-10-18 14:55:23 -04:00
hstore_plpython Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
intagg Schema-qualify some references to regprocedure. 2016-06-10 10:41:58 -04:00
intarray Avoid crashes in contrib/intarray gist__int_ops (bug #15518) 2018-11-24 08:39:55 +00:00
isn Fix typos in comments. 2017-02-06 11:34:15 +02:00
lo Update lo extension for parallel query. 2016-06-07 11:26:42 -04:00
ltree Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:30 -04:00
ltree_plpython Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
oid2name Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
pageinspect Fix tuple_data_split() to not open a relation without any lock. 2018-10-01 11:51:07 -04:00
passwordcheck Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_buffercache pg_buffercache: Allow huge allocations. 2016-09-15 09:30:37 -04:00
pg_freespacemap Update pg_freespacemap extension for parallel query. 2016-06-09 17:18:16 -04:00
pg_prewarm Avoid using potentially-under-aligned page buffers. 2018-09-01 15:27:13 -04:00
pg_standby Fix new warnings from GCC 7 2017-05-16 08:52:39 -04:00
pg_stat_statements Fix typos in comments. 2017-02-06 11:34:15 +02:00
pg_trgm Rework word_similarity documentation, make it close to actual algorithm. 2018-03-21 14:37:51 +03:00
pg_visibility Fix bugs in contrib/pg_visibility. 2016-10-01 16:32:55 -04:00
pgcrypto Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:30 -04:00
pgrowlocks Fix handling of multixacts predating pg_upgrade 2016-06-24 18:29:28 -04:00
pgstattuple Minor fixes in contrib installation scripts. 2016-06-14 10:47:06 -04:00
postgres_fdw Repair bogus EPQ plans generated for postgres_fdw foreign joins. 2018-12-12 16:08:30 -05:00
seg Fix typos in comments. 2017-02-06 11:34:15 +02:00
sepgsql Silence compiler warning in sepgsql 2017-04-06 14:24:41 -07:00
spi Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
sslinfo Support OpenSSL 1.1.0. 2016-09-15 12:55:38 +03:00
start-scripts Provide modern examples of how to auto-start Postgres on macOS. 2017-11-17 12:47:21 -05:00
tablefunc Widen query numbers-of-tuples-processed counters to uint64. 2016-03-12 16:05:29 -05:00
tcn Revert CREATE INDEX ... INCLUDING ... 2016-04-08 21:52:13 +03:00
test_decoding Fix logical decoding error when system table w/ toast is repeatedly rewritten. 2018-10-10 13:53:02 -07:00
tsearch2 Fix typos in comments. 2017-02-06 11:34:15 +02:00
tsm_system_rows Update copyright for 2016 2016-01-02 13:33:40 -05:00
tsm_system_time Update copyright for 2016 2016-01-02 13:33:40 -05:00
unaccent Make contrib/unaccent's unaccent() function work when not in search path. 2018-09-06 10:49:45 -04:00
uuid-ossp Give a useful error message if uuid-ossp is built without preconfiguration. 2016-12-22 11:19:13 -05:00
vacuumlo Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
xml2 Fix typos in comments. 2017-02-06 11:34:15 +02:00
Makefile Bloom index contrib module 2016-04-01 16:42:24 +03:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
contrib-global.mk Respect TEMP_CONFIG when pg_regress_check and friends are called 2016-02-27 12:28:21 -05:00

README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.