Re: inherit support for foreign tables

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, David Fetter <david(at)fetter(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: inherit support for foreign tables
Date: 2014-01-30 05:06:28
Message-ID: 323DD025-09B7-4C7A-8419-DE062D9CD68D@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sent from my iPad

On 28-Jan-2014, at 10:04, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> wrote:

>>> 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?
>>
>> The answer is no, in my understanding. The altering operation simply
>> declares some chages for foreign tables in the inheritance tree and does
>> nothing to the underlying storages.
> It seems to me Atri mention about the idea to enforce constraint when
> partitioned foreign table was referenced...
>
> BTW, isn't it feasible to consign FDW drivers its decision?
> If a foreign table has a check constraint (X BETWEEN 101 AND 200),
> postgres_fdw will be capable to run this check on the remote server,
> however, file_fdw will not be capable. It is usual job of them when
> qualifiers are attached on Path node.
> Probably, things to do is simple. If the backend appends the configured
> check constraint as if a user-given qualifier, FDW driver will handle

Hi,

I think that pushing it to FDW driver is the best approach. The FDW driver knows whether or not the foreign server supports the said feature,hence,the user should be abstracted from that.

I agree that the foreign constraint can be added as a user defined qualifier and dealt with accordingly.

Regards,

Atri

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-01-30 05:25:03 Re: Row-security on updatable s.b. views
Previous Message Shigeru Hanada 2014-01-30 05:01:10 Re: inherit support for foreign tables