Re: Rules and Views

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Curt Sampson <cjs(at)cynic(dot)net>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Rules and Views
Date: 2002-08-01 17:19:07
Message-ID: 20020801100955.K29686-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 1 Aug 2002, Tom Lane wrote:

> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)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, then
Case:
A) If m>0 and n=0, then T contains exactly one duplicate of R.
B) Otherwise, T contains no 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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2002-08-01 17:21:34 Re: Trimming the Fat: Getting code via CVSup ...
Previous Message Marc G. Fournier 2002-08-01 17:00:50 Re: Trimming the Fat: Getting code via CVSup ...