postgresql/contrib
Tom Lane 0d0aa5d291 Provide some static-assertion functionality on all compilers.
On reflection (especially after noticing how many buildfarm critters have
__builtin_types_compatible_p but not _Static_assert), it seems like we
ought to try a bit harder to make these macros do something everywhere.
The initial cut at it would have been no help to code that is compiled only
on platforms without _Static_assert, for instance; and in any case not all
our contributors do their initial coding on the latest gcc version.

Some googling about static assertions turns up quite a bit of prior art
for making it work in compilers that lack _Static_assert.  The method
that seems closest to our needs involves defining a struct with a bit-field
that has negative width if the assertion condition fails.  There seems no
reliable way to get the error message string to be output, but throwing a
compile error with a confusing message is better than missing the problem
altogether.

In the same spirit, if we don't have __builtin_types_compatible_p we can at
least insist that the variable have the same width as the type.  This won't
catch errors such as "wrong pointer type", but it's far better than
nothing.

In addition to changing the macro definitions, adjust a
compile-time-constant Assert in contrib/hstore to use StaticAssertStmt,
so we can get some buildfarm coverage on whether that macro behaves sanely
or not.  There's surely more places that could be converted, but this is
the first one I came across.
2012-09-30 22:46:29 -04:00
..
adminpack Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
auth_delay
auto_explain Fix assorted compilation failures in contrib 2012-08-28 23:50:49 -04:00
btree_gin
btree_gist Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
chkpass
citext Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
cube Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
dblink Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
dict_int Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dict_xsyn Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
dummy_seclabel Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
earthdistance
file_fdw Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
fuzzystrmatch Even more duplicate word removal, in the spirit of the season 2012-05-02 20:56:03 +03:00
hstore Provide some static-assertion functionality on all compilers. 2012-09-30 22:46:29 -04:00
intagg
intarray Remove unreachable code 2012-07-16 22:15:03 +03:00
isn Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
lo
ltree Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
oid2name Make oid2name, pgbench, and vacuumlo set fallback_application_name. 2012-07-04 15:39:33 -04:00
pageinspect Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
passwordcheck Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pg_archivecleanup Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
pg_buffercache Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
pg_freespacemap
pg_standby Make documentation of --help and --version options more consistent 2012-06-18 02:46:59 +03:00
pg_stat_statements Remove pg_stat_statements--1.0.sql, too. 2012-08-28 14:33:56 -04:00
pg_test_fsync Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pg_test_timing Adjust pg_test_timing to show shortest test durations first, place 2012-08-28 12:57:13 -04:00
pg_trgm Fix bugs in contrib/pg_trgm's LIKE pattern analysis code. 2012-08-20 13:25:42 -04:00
pg_upgrade pg_upgrade test: Disable fsync in initdb and postgres calls 2012-09-26 22:41:57 -04:00
pg_upgrade_support Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
pgbench pgbench: Show better progress when loading tuples 2012-09-05 23:07:47 -04:00
pgcrypto Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
pgrowlocks
pgstattuple Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
seg Run newly-configured perltidy script on Perl files. 2012-07-04 21:47:49 -04:00
sepgsql sepgsql cleanups. 2012-09-05 14:01:59 -04:00
spi Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
sslinfo Lots of doc corrections. 2012-04-23 22:43:09 -04:00
start-scripts Support Linux's oom_score_adj API as well as the older oom_adj API. 2012-06-13 15:35:52 -04:00
tablefunc Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
tcn Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
test_parser Fix one-byte buffer overrun in contrib/test_parser. 2012-01-09 19:56:27 -05:00
tsearch2 Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
unaccent Fix some typos 2012-04-22 19:23:47 +03:00
uuid-ossp Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
vacuumlo Make oid2name, pgbench, and vacuumlo set fallback_application_name. 2012-07-04 15:39:33 -04:00
xml2 Split tuple struct defs from htup.h to htup_details.h 2012-08-30 16:52:35 -04:00
contrib-global.mk
Makefile pg_test_timing utility, to measure clock monotonicity and timing cost. 2012-03-27 16:14:00 -04:00
README Update contrib/README 2012-04-14 09:29:54 +03:00

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 "gmake all" and "gmake
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.