Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-05 Thread Robert Haas
On Thu, Aug 3, 2017 at 9:29 PM, Amit Langote wrote: > Thanks for committing the code changes. > > About the documentation changes, it seems that the only places where any > description of NOT VALID appears is ALTER TABLE, ALTER FOREIGN TABLE, and > ALTER DOMAIN references pages. Even if the CREAT

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-03 Thread Amit Langote
On 2017/08/04 2:13, Robert Haas wrote: > On Thu, Aug 3, 2017 at 12:35 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote >>> wrote: Attached is a patch. I think this could be considered a bug-fix, backpatchable to 9.6 which introduced this beha

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-03 Thread Robert Haas
On Thu, Aug 3, 2017 at 12:35 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote >> wrote: >>> Attached is a patch. I think this could be considered a bug-fix, >>> backpatchable to 9.6 which introduced this behavior change [1]. > >> I could go either way on

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote > wrote: >> Attached is a patch. I think this could be considered a bug-fix, >> backpatchable to 9.6 which introduced this behavior change [1]. > I could go either way on that. It's not inconceivable somebody could > be unhappy

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 9:41 PM, Amit Langote wrote: > On 2017/08/02 20:40, Robert Haas wrote: >> On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat >> wrote: >>> If the user has specified "not valid" for a constraint on the foreign >>> table, there is high chance that s/he is aware of the fact that t

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Amit Langote
On 2017/08/02 20:40, Robert Haas wrote: > On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat > wrote: >> If the user has specified "not valid" for a constraint on the foreign >> table, there is high chance that s/he is aware of the fact that the >> remote table that the foreign table points to has som

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Robert Haas
On Wed, Aug 2, 2017 at 3:46 AM, Ashutosh Bapat wrote: > If the user has specified "not valid" for a constraint on the foreign > table, there is high chance that s/he is aware of the fact that the > remote table that the foreign table points to has some rows which will > violet the constraint. So,

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-02 Thread Ashutosh Bapat
On Tue, Aug 1, 2017 at 2:41 PM, Amit Langote wrote: > On 2017/08/01 17:54, Simon Riggs wrote: >> On 1 August 2017 at 08:37, Amit Langote >> wrote: >>> On 2017/08/01 15:22, Simon Riggs wrote: On 1 August 2017 at 07:16, Amit Langote wrote: > In f27a6b15e656 (9.6 & later), we decide

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Amit Langote
On 2017/08/01 17:54, Simon Riggs wrote: > On 1 August 2017 at 08:37, Amit Langote wrote: >> On 2017/08/01 15:22, Simon Riggs wrote: >>> On 1 August 2017 at 07:16, Amit Langote >>> wrote: In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints declared NOT VALID valid if cr

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Simon Riggs
On 1 August 2017 at 08:37, Amit Langote wrote: > On 2017/08/01 15:22, Simon Riggs wrote: >> On 1 August 2017 at 07:16, Amit Langote >> wrote: >>> In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints >>> declared NOT VALID valid if created with table." In retrospect, >>> constrai

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-08-01 Thread Amit Langote
On 2017/08/01 15:22, Simon Riggs wrote: > On 1 August 2017 at 07:16, Amit Langote wrote: >> In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints >> declared NOT VALID valid if created with table." In retrospect, >> constraints on foreign tables should have been excluded from consi

Re: [HACKERS] foreign table creation and NOT VALID check constraints

2017-07-31 Thread Simon Riggs
On 1 August 2017 at 07:16, Amit Langote wrote: > In f27a6b15e656 (9.6 & later), we decided to "Mark CHECK constraints > declared NOT VALID valid if created with table." In retrospect, > constraints on foreign tables should have been excluded from consideration > in that commit, because the thinki