Re: CREATE FOREGIN TABLE LACUNA - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: CREATE FOREGIN TABLE LACUNA
Date
Msg-id 1331836148.22067.3.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: CREATE FOREGIN TABLE LACUNA  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On ons, 2012-03-14 at 17:38 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > On ons, 2012-03-14 at 17:16 -0400, Robert Haas wrote:
> >> If a constraint is NOT ENFORCED, then the query planner presumably
> >> won't rely on it for planning purposes 
> 
> > Why do you presume that?
> 
> What does SQL:2011 say exactly about the semantics of NOT ENFORCED?
> Is an implementation allowed to fail in undefined ways if a constraint
> is marked NOT ENFORCED and is not actually true?

It doesn't say anything about that.  I might have to dig deeper into the
change proposals to see if any rationale came with this change.

But in any case, even if we spell it differently, I think there are use
cases for a constraint mode that says, assume it's true for optimization
purposes, but don't spend any cycles on verifying it.  And that
constraint mode could apply to regular tables and foreign tables alike.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_upgrade and statistics
Next
From: Tom Lane
Date:
Subject: Re: pg_upgrade and statistics