Re: [HACKERS] DISTINCT and ORDER BY bug?

Поиск
Список
Период
Сортировка
От Taral
Тема Re: [HACKERS] DISTINCT and ORDER BY bug?
Дата
Msg-id Pine.LNX.4.10.10002070011270.27753-100000@r149127-2815.dobiecenter.com
обсуждение исходный текст
Ответ на Re: [HACKERS] DISTINCT and ORDER BY bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 7 Feb 2000, Tom Lane wrote:

> Well, it's not a bug --- it was an entirely deliberate change.  It
> might be a misfeature though.  The case we were concerned about was
> 
>     select distinct x from foo order by y;
> 
> which produces ill-defined results. 

Okay, I can understand this...

>     select distinct sin(x) from foo order by abs(sin(x));
> 
>     select distinct random(x) from foo order by abs(random(x));

The thing here is that random() is not deterministic on its inputs,
whereas sin() is. Perhaps we should only allow fully deterministic ORDER
BY? (Ugh, another flag for functions...)

Taral



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Chris Bitmead
Дата:
Сообщение: Re: [HACKERS] Advice needed,
Следующее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] ONLY