Re: CREATE FOREGIN TABLE LACUNA - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE FOREGIN TABLE LACUNA
Date
Msg-id 29988.1331735248@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE FOREGIN TABLE LACUNA  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: CREATE FOREGIN TABLE LACUNA  (David Fetter <david@fetter.org>)
Re: CREATE FOREGIN TABLE LACUNA  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 14, 2012 at 8:28 AM, David Fetter <david@fetter.org> wrote:
>> Here's a WIP patch (lots of cut/paste, no docs, no tests), but it does
>> work. �Still to do in addition: decide whether ALTER FOREIGN TABLE
>> should also handle LIKE.

> I think that instead of inventing new grammar productions and a new
> node type for this, you should just reuse the existing productions for
> LIKE clauses and then reject invalid options during parse analysis.

+1; in this approach, adding more features will make it worse not better.

> I'd actually like to see us allow foreign tables to have constraints.
> Obviously, we can't enforce constraints on remote data, but the point
> would be allow the system administrator to supply the query planner
> with enough knowledge to make constraint exclusion work.  The fact
> that you can't make that work today is a major gap, IMV.

Hm.  That opinion seems to me to connect to the recently-posted patch to
make contrib/file_fdw enforce NOT NULL constraints.  Should we instead
have the position that constraints declared for foreign tables are
statements that we can take on faith, and it's the user's fault if they
are wrong?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: VALID UNTIL
Next
From: David Fetter
Date:
Subject: Re: CREATE FOREGIN TABLE LACUNA