Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-24 Thread Robert Haas
On Wed, Aug 22, 2012 at 12:59 PM, Jeff Davis davis.jeff...@gmail.com wrote: On Tue, 2012-08-21 at 10:41 -0400, Robert Haas wrote: The thing to keep in mind here is that EVERY property of a foreign table is subject to change at any arbitrary point in time, without our knowledge. ... Why should

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-22 Thread Jeff Davis
On Tue, 2012-08-21 at 10:41 -0400, Robert Haas wrote: The thing to keep in mind here is that EVERY property of a foreign table is subject to change at any arbitrary point in time, without our knowledge. ... Why should CHECK constraints be any different than, say, column types? So, let's say

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-21 Thread Robert Haas
On Mon, Aug 20, 2012 at 5:14 PM, Jeff Davis pg...@j-davis.com wrote: On Mon, 2012-08-20 at 16:50 -0400, Robert Haas wrote: #3 for foreign tables. I'm skeptical of that approach for two reasons: (1) It will be hard to inform users which constraints are enforced and which aren't. The thing

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-20 Thread Robert Haas
On Fri, Aug 17, 2012 at 4:08 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Excerpts from Robert Haas's message of vie ago 17 15:44:29 -0400 2012: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-20 Thread Jeff Davis
On Fri, 2012-08-17 at 15:44 -0400, Robert Haas wrote: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has come up before, I

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-20 Thread Robert Haas
On Mon, Aug 20, 2012 at 3:56 PM, Jeff Davis pg...@j-davis.com wrote: On Fri, 2012-08-17 at 15:44 -0400, Robert Haas wrote: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-20 Thread Jeff Davis
On Mon, 2012-08-20 at 16:50 -0400, Robert Haas wrote: #3 for foreign tables. I'm skeptical of that approach for two reasons: (1) It will be hard to inform users which constraints are enforced and which aren't. (2) It will be hard for users to understand the planner benefits or the consequences

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: I mean, what are NOT NULL in foreign tables for? There was previous discussion about that, in the context of check constraints in general, but I don't believe we reached consensus.

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Robert Haas
On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has come up before, I think that constraints on foreign tables should be viewed

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Alvaro Herrera
Excerpts from Robert Haas's message of vie ago 17 15:44:29 -0400 2012: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Euler Taveira
On 17-08-2012 16:44, Robert Haas wrote: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has come up before, I think that