Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw
Date
Msg-id 5AA27642.4040905@lab.ntt.co.jp
Whole thread Raw
In response to Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
Hi Ashutosh,

(2018/03/08 14:24), Ashutosh Bapat wrote:
> Etsuro said [2] that WCO constraints can not be implemented on foreign
> server and normal check constraints can be, and for that he provides
> an example in [3]. But I think that example is going the wrong
> direction.

More precisely, what I'm saying there is: for WCO constraints created by 
an auto-updatable view over a foreign table, we cannot always implement 
constraints on the remote side that match with those WCO constraints.

> For local constraints to be enforced, we use remote
> constraints. For local WCO we need to use remote WCO. That means we
> create many foreign tables pointing to same local table on the foreign
> server through many views, but it's not impossible.

Maybe I don't understand this correctly, but I guess that it would be 
the user's responsibility to not create foreign tables in such a way.

Best regards,
Etsuro Fujita


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: inserts into partitioned table may cause crash
Next
From: Robert Haas
Date:
Subject: Re: Testbed for predtest.c ... and some arguable bugs therein