Re: AW: [HACKERS] having and union in v7beta

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Jose Soares'" <jose(at)sferacarta(dot)com>, "'hackers'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: AW: [HACKERS] having and union in v7beta
Date: 2000-03-02 16:23:35
Message-ID: Pine.GSO.4.02A.10003021718390.27493-100000@Dront.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak - Zakkr 2000-03-02 16:32:51 SPI and qCache and bug?
Previous Message Peter Eisentraut 2000-03-02 16:13:55 Re: [HACKERS] PostgreSQL on Solaris/SPARC with gcc