pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow CHECK constraints to be placed on foreign tables.
Date: Wed, 17 Dec 2014 22:01:05 +0000
Message-ID: <E1Y1MeX-00075v-RL@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fc2ac1fb41c2defb8caf825781af75db158fb7a9

Modified Files
--------------
contrib/file_fdw/input/file_fdw.source         |   16 +++-
contrib/file_fdw/output/file_fdw.source        |   32 ++++++-
contrib/postgres_fdw/expected/postgres_fdw.out |   85 ++++++++++++++++++
contrib/postgres_fdw/sql/postgres_fdw.sql      |   30 +++++++
doc/src/sgml/ref/alter_foreign_table.sgml      |  113 ++++++++++++++++++------
doc/src/sgml/ref/create_foreign_table.sgml     |   65 +++++++++++++-
src/backend/catalog/heap.c                     |    9 +-
src/backend/commands/tablecmds.c               |    8 +-
src/backend/parser/parse_utilcmd.c             |   51 ++++++++---
src/test/regress/expected/foreign_data.out     |   57 ++++++++++--
src/test/regress/sql/foreign_data.sql          |   28 +++++-
11 files changed, 432 insertions(+), 62 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1Y1MeX-00075v-RL@gemulon.postgresql.org>
Permalink:  ../E1Y1MeX-00075v-RL@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Y1MeX-00075v-RL@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Allow CHECK constraints to be placed on foreign tables.
  In-Reply-To: <E1Y1MeX-00075v-RL@gemulon.postgresql.org>
  References: <E1Y1MeX-00075v-RL@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox