Re: inherit support for foreign tables

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: inherit support for foreign tables
Date: 2014-01-27 15:55:42
Message-ID: DED41473-95CF-43A8-ACC5-33C9DC893CE0@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sent from my iPad

> On 27-Jan-2014, at 21:03, David Fetter <david(at)fetter(dot)org> wrote:
>
>> On Mon, Jan 27, 2014 at 05:06:19PM +0900, Etsuro Fujita wrote:
>> Hi Hanada-san,
>>
>> While still reviwing this patch, I feel this patch has given enough
>> consideration to interactions with other commands, but found the
>> following incorrect? behabior:
>>
>> postgres=# CREATE TABLE product (id INTEGER, description TEXT);
>> CREATE TABLE
>> postgres=# CREATE FOREIGN TABLE product1 () INHERITS (product)
>> SERVER fs OPTIONS (filename '/home/foo/product1.csv', format 'csv');
>> CREATE FOREIGN TABLE
>> postgres=# ALTER TABLE product ALTER COLUMN description SET STORAGE
>> EXTERNAL;
>> ERROR: "product1" is not a table or materialized view
>>
>> ISTN the ALTER TABLE simple recursion mechanism (ie
>> ATSimpleRecursion()) should be modified for the ALTER COLUMN SET
>> STORAGE case.
>
> This points to a larger discussion about what precisely foreign tables
> can and cannot inherit from local ones. I don't think that a generic
> solution will be satisfactory, as the PostgreSQL FDW could, at least
> in principle, support many more than the CSV FDW, as shown above.
>
> In my estimation, the outcome of discussion above is not a blocker for
> this

I wonder what shall be the cases when foreign table is on a server which does not support *all* SQL features.

Does a FDW need to have the possible inherit options mentioned in its documentation for this patch?

Regards,

Atri

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-01-27 16:09:16 Re: WIP patch (v2) for updatable security barrier views
Previous Message David Fetter 2014-01-27 15:33:22 Re: inherit support for foreign tables