Re: Another oddity in handling of WCO constraints in postgres_fdw

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Another oddity in handling of WCO constraints in postgres_fdw
Date: 2017-11-10 11:36:01
Message-ID: 5A058F21.2040201@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2017/11/01 11:16), Robert Haas wrote:
> On Wed, Oct 4, 2017 at 5:58 PM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
>> The view with WCO is local but the modification which violates WCO is
>> being made on remote server by a trigger on remote table. Trying to
>> control that doesn't seem to be a good idea, just like we can't
>> control what rows get inserted on the foreign server when they violate
>> local constraints.
>
> I think that's a fair point.

For local constraints on foreign tables, it's the user's responsibility
to ensure that those constraints matches the remote side, so we don't
need to ensure those constraints locally. But I'm not sure if the same
thing applies to WCOs on views defined on foreign tables, because in
some case it's not possible to impose constraints on the remote side
that match those WCOs, as I explained before.

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martín Marqués 2017-11-10 13:32:23 Re: pg_basebackup --progress output for batch execution
Previous Message amul sul 2017-11-10 11:03:58 Re: Runtime Partition Pruning