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

From Zeugswetter Andreas SB
Subject AW: [HACKERS] having and union in v7beta
Date
Msg-id 219F68D65015D011A8E000006F8590C604AF7D07@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: AW: [HACKERS] having and union in v7beta  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: AW: [HACKERS] having and union in v7beta  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
List pgsql-hackers
>> play=> explain select * from comuni union select * from comuni;
> *However*, we have not fixed the bug that causes "select foo union
> select foo" to be incorrectly simplified --- the UNION code is still
> applying cnfify.  (Which it probably shouldn't, but I haven't wanted
> to touch that code until I have the time to rewrite it completely.)
> The reason 7.0beta1 generates the "right" answer is that it has a
> recently-introduced bug in the comparison routines that causes it to
> think the two select subqueries aren't the same.

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.

Thus 6.5 simplification is correct in this particular case.

Andreas


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: [HACKERS] Locking
Next
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] bitten by docs