Re: [v9.3] writable foreign tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [v9.3] writable foreign tables
Date
Msg-id 24499.1363028814@sss.pgh.pa.us
Whole thread Raw
In response to Re: [v9.3] writable foreign tables  (Greg Stark <stark@mit.edu>)
Responses Re: [v9.3] writable foreign tables  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> It feels a bit like unpredictable magic to have "DEFAULT" mean one
> thing and omitted columns mean something else.

Agreed.  The current code behaves that way, but I think that's
indisputably a bug not behavior we want to keep.

> Perhaps we should have
> an explicit LOCAL DEFAULT and REMOTE DEFAULT and then have DEFAULT and
> omitted columns both mean the same thing.

I don't think we really want to introduce new syntax for this, do you?
Especially not when many FDWs won't have a notion of a remote default
at all.

My thought was that the ideal behavior is that there's only one default
for a column, with any local definition of it taking precedence over any
remote definition.  But see later message about how that may be hard to
implement correctly.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [v9.3] writable foreign tables
Next
From: Thom Brown
Date:
Subject: Re: [v9.3] writable foreign tables