From: | "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com> |
Subject: | Re: Wish: remove ancient constructs from Postgres |
Date: | 2006-02-27 15:59:21 |
Message-ID: | e431ff4c0602270759n2e541191y7762211d2f2bab42@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2/27/06, Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> wrote:
>
> On Mon, 27 Feb 2006, Nikolay Samokhvalov wrote:
>
> > On 2/27/06, Bruno Wolff III <bruno(at)wolff(dot)to> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-02-27 16:20:17 | Re: Wish: remove ancient constructs from Postgres |
Previous Message | Stephan Szabo | 2006-02-27 15:48:36 | Re: Wish: remove ancient constructs from Postgres |