Re: AW: [HACKERS] having and union in v7beta - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: AW: [HACKERS] having and union in v7beta
Date
Msg-id Pine.GSO.4.02A.10003021718390.27493-100000@Dront.DoCS.UU.SE
Whole thread Raw
In response to AW: [HACKERS] having and union in v7beta  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
On Thu, 2 Mar 2000, Zeugswetter Andreas SB wrote:

> But if the two queries are the same, the union CAN be simplified,
> since the union of two identical masses (I don't know the correct word here)
> is still that one mass.

"set" :)

> 
> Thus 6.5 simplification is correct in this particular case.

The issue here seems to be that the queries could have side-effects, such
as

select nextval('sequence1') union
select nextval('sequence1')

which should arguably return two distinct rows. I gotta reread SQL's
opinion on this, but I'm sure Tom has already done that. From a
mathematical point of view, I believe your assumption "lexically equal
queries yield mathematically equal sets" is wrong.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] PostgreSQL on Solaris/SPARC with gcc
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] bitten by docs