]> granicus.if.org Git - postgresql/commit
Allow CHECK constraints to be placed on foreign tables.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Dec 2014 22:00:53 +0000 (17:00 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Dec 2014 22:00:53 +0000 (17:00 -0500)
commitfc2ac1fb41c2defb8caf825781af75db158fb7a9
treeec534f15130635754fcb41aecde19700a91abd36
parentce01548d4fdbc06dce59f90a3e4598162b1e8ea1
Allow CHECK constraints to be placed on foreign tables.

As with NOT NULL constraints, we consider that such constraints are merely
reports of constraints that are being enforced by the remote server (or
other underlying storage mechanism).  Their only real use is to allow
planner optimizations, for example in constraint-exclusion checks.  Thus,
the code changes here amount to little more than removal of the error that
was formerly thrown for applying CHECK to a foreign table.

(In passing, do a bit of cleanup of the ALTER FOREIGN TABLE reference page,
which had accumulated some weird decisions about ordering etc.)

Shigeru Hanada and Etsuro Fujita, reviewed by Kyotaro Horiguchi and
Ashutosh Bapat.
contrib/file_fdw/input/file_fdw.source
contrib/file_fdw/output/file_fdw.source
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/sql/postgres_fdw.sql
doc/src/sgml/ref/alter_foreign_table.sgml
doc/src/sgml/ref/create_foreign_table.sgml
src/backend/catalog/heap.c
src/backend/commands/tablecmds.c
src/backend/parser/parse_utilcmd.c
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql