postgresql/contrib
Tom Lane dd7a8f66ed Redesign tablesample method API, and do extensive code review.
The original implementation of TABLESAMPLE modeled the tablesample method
API on index access methods, which wasn't a good choice because, without
specialized DDL commands, there's no way to build an extension that can
implement a TSM.  (Raw inserts into system catalogs are not an acceptable
thing to do, because we can't undo them during DROP EXTENSION, nor will
pg_upgrade behave sanely.)  Instead adopt an API more like procedural
language handlers or foreign data wrappers, wherein the only SQL-level
support object needed is a single handler function identified by having
a special return type.  This lets us get rid of the supporting catalog
altogether, so that no custom DDL support is needed for the feature.

Adjust the API so that it can support non-constant tablesample arguments
(the original coding assumed we could evaluate the argument expressions at
ExecInitSampleScan time, which is undesirable even if it weren't outright
unsafe), and discourage sampling methods from looking at invisible tuples.
Make sure that the BERNOULLI and SYSTEM methods are genuinely repeatable
within and across queries, as required by the SQL standard, and deal more
honestly with methods that can't support that requirement.

Make a full code-review pass over the tablesample additions, and fix
assorted bugs, omissions, infelicities, and cosmetic issues (such as
failure to put the added code stanzas in a consistent ordering).
Improve EXPLAIN's output of tablesample plans, too.

Back-patch to 9.5 so that we don't have to support the original API
in production.
2015-07-25 14:39:00 -04:00
..
adminpack Update copyright for 2015 2015-01-06 11:43:47 -05:00
auth_delay Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
auto_explain Rearrange explain.c's API so callers need not embed sizeof(ExplainState). 2015-01-15 13:39:33 -05:00
btree_gin pgindent run for 9.5 2015-05-23 21:35:49 -04:00
btree_gist pgindent run for 9.5 2015-05-23 21:35:49 -04:00
chkpass Avoid returning undefined bytes in chkpass_in(). 2015-02-14 12:20:56 -05:00
citext Fix incorrect declaration of citext's regexp_matches() functions. 2015-05-05 15:51:22 -04:00
cube Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
dblink Fix volatile-safety issue in dblink's materializeQueryResult(). 2015-01-26 15:17:33 -05:00
dict_int Update copyright for 2015 2015-01-06 11:43:47 -05:00
dict_xsyn Update copyright for 2015 2015-01-06 11:43:47 -05:00
earthdistance Improve speed of make check-world 2015-04-23 08:59:52 -04:00
file_fdw TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00
fuzzystrmatch pgindent run for 9.5 2015-05-23 21:35:49 -04:00
hstore pgindent run for 9.5 2015-05-23 21:35:49 -04:00
hstore_plperl Enable transforms modules to build and test on Cygwin. 2015-07-18 10:09:04 -04:00
hstore_plpython Enable transforms modules to build and test on Cygwin. 2015-07-18 10:09:04 -04:00
intagg Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
intarray Add selectivity estimation functions for intarray operators. 2015-07-21 20:59:24 +03:00
isn Collection of typo fixes. 2015-05-20 16:56:22 +03:00
lo Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
ltree pgindent run for 9.5 2015-05-23 21:35:49 -04:00
ltree_plpython Enable transforms modules to build and test on Cygwin. 2015-07-18 10:09:04 -04:00
oid2name Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
pageinspect pgindent run for 9.5 2015-05-23 21:35:49 -04:00
passwordcheck Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_buffercache pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pg_freespacemap Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pg_prewarm Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_standby Make use of xlog_internal.h's macros in WAL-related utilities. 2015-07-02 10:35:38 +09:00
pg_stat_statements Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
pg_trgm This supports the triconsistent function for pg_trgm GIN opclass 2015-07-20 18:18:48 +03:00
pgcrypto pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pgrowlocks Optimize locking a tuple already locked by another subxact 2015-04-10 13:47:15 -03:00
pgstattuple Prevent pgstattuple() from reporting BRIN as unknown index. 2015-07-14 22:36:51 +09:00
postgres_fdw Use appendStringInfoString/Char et al where appropriate. 2015-07-02 12:36:03 +03:00
seg Move strategy numbers to include/access/stratnum.h 2015-05-15 17:03:16 -03:00
sepgsql Represent columns requiring insert and update privileges indentently. 2015-05-08 00:20:46 +02:00
spi Collection of typo fixes. 2015-05-20 16:56:22 +03:00
sslinfo Make Port->ssl_in_use available, even when built with !USE_SSL 2014-11-25 09:46:11 +02:00
start-scripts Fix typo in linux startup script. 2015-04-26 09:43:15 -04:00
tablefunc Handle unexpected query results, especially NULLs, safely in connectby(). 2015-01-29 20:18:33 -05:00
tcn Update copyright for 2015 2015-01-06 11:43:47 -05:00
test_decoding Fix test_decoding's handling of nonexistant columns in old tuple versions. 2015-06-27 19:00:45 +02:00
tsearch2 Add an optional missing_ok argument to SQL function current_setting(). 2015-07-02 16:41:07 -04:00
tsm_system_rows Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
tsm_system_time Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
unaccent Update copyright for 2015 2015-01-06 11:43:47 -05:00
uuid-ossp Update copyright for 2015 2015-01-06 11:43:47 -05:00
vacuumlo vacuumlo: Avoid unlikely memory leak. 2015-01-14 15:14:20 -05:00
xml2 Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
Makefile Finish removing pg_audit 2015-05-28 12:48:25 -04:00
README Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
contrib-global.mk Remove cvs keywords from all files. 2010-09-20 22:08:53 +02: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.