Re: Wish: remove ancient constructs from Postgres

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: "Bruno Wolff III" <bruno(at)wolff(dot)to>
Subject: Re: Wish: remove ancient constructs from Postgres
Date: 2006-02-27 15:34:16
Message-ID: e431ff4c0602270734u695b819fv2a4023b680bdb841@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

When newbie types 'random()', he understands what he is doing, but
it's not the case for 'DISTINCT ON' and can lead to mistakes.

--
Best regards,
Nikolay

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2006-02-27 15:48:36 Re: Wish: remove ancient constructs from Postgres
Previous Message Nikolay Samokhvalov 2006-02-27 15:26:02 Re: Wish: remove ancient constructs from Postgres