From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Ronan Dunklau <ronan(dot)dunklau(at)dalibo(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: IMPORT FOREIGN SCHEMA statement |
Date: | 2014-07-10 00:52:23 |
Message-ID: | 16977.1404953543@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> I've started looking at this patch. I wonder whether it's really such
> a great idea to expect the FDW to return a list of parsetrees for
> CREATE FOREIGN TABLE commands; that seems like a recipe for breakage
> anytime we change the parsetree representation, say add a field to
> ColumnDef. The alternative I'm thinking about is to have the FDW pass
> back a list of strings, which would be textual CREATE FOREIGN TABLE
> commands.
Here's a rather-heavily-editorialized draft patch that does it like that.
This patch takes the viewpoint I espoused nearby of allowing names in
the LIMIT TO clause that aren't present on the remote server. If we
decide we want to hew to the letter of the standard on that, I'd be
inclined to enforce this in the core code, not in individual FDWs as
the submitted patch did. (I didn't much like that implementation
anyway, since it didn't tell you which name it was unhappy about.)
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
import-foreign-schema-2.patch | text/x-diff | 57.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-07-10 01:28:08 | Re: IMPORT FOREIGN SCHEMA statement |
Previous Message | Peter Geoghegan | 2014-07-10 00:20:14 | Re: things I learned from working on memory allocation |