On 2/27/06, Stephan Szabo <[EMAIL PROTECTED]> wrote:
>
> On Mon, 27 Feb 2006, Nikolay Samokhvalov wrote:
>
> > On 2/27/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote:
> > The alternatives to distinct on are painful. They are generally both harder
> > to read and run slower.
> >
>
> >'DISTINCT ON' is evil constuction, because (w/o any 'ORDER BY') it
> >produses unpredictable result, as 'ORDER BY random()' does.
>
> And so does UNION in the standard under some circumstances (look at
> anywhere in the spec that a query expression is possibly
> non-deterministic), so I think that's a weak argument.
>
it's completely different thing. look at the spec and you'll
understand the difference. in two words, with 'DISTINCT ON' we lose
some values (from some columns), when UNION not (it just removes
duplicates, comparing _entire_ rows).

--
Best regards,
Nikolay

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to