Re: Rules and Views - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Rules and Views
Date
Msg-id 20020801100955.K29686-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Rules and Views  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Rules and Views  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 1 Aug 2002, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:

> > If we assume two collations one case sensitive one not with the
> > except in the non-sensitive and the where in the sensitive and
> > a left with 'A' and right with 'a', it'd be incorrect to push a
> > case sensitive where foo='A' down to the right since that'd change the
> > output from zero rows to one.
>
> You missed my point.  Per spec, either zero or one rows out of the whole
> thing is okay, because either the 'A' or the 'a' row might be returned
> as the representative row for the group by the EXCEPT.  Yes, the
> behavior may change, but it's still within spec.

Except can't return 'A' or 'a', there is no representative row because
n>0. That's the difference with UNION and INTERSECT.

"If EXCEPT is specified, thenCase: A) If m>0 and n=0, then T contains exactly one duplicate of R. B) Otherwise, T
containsno duplicate of R."
 

So if T1 has a #dups>0 and T2 has a #dups>0 we should get
no rows, but what if T1' (with the clause) has a #dups>0 but
T2' has a #dups=0?




pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: View vs. Statement Query Plan
Next
From: Thomas Lockhart
Date:
Subject: Re: Trimming the Fat: Getting code via CVSup ...