Re: [HACKERS] distinct. Is this the correct behaviour?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] distinct. Is this the correct behaviour?
Дата
Msg-id 16494.940513014@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] distinct. Is this the correct behaviour?  (sszabo@bigpanda.com)
Список pgsql-hackers
sszabo@bigpanda.com writes:
> This seems to generally work in postgres for the simple cases I tried:
>  select x from foo group by x order by min(y)

> Now I don't know if there are any hidden gotchas in that (or wierdness
> with the spec), but it also feels better to me than using distinct in this
> case as well, because it seems to explicitly describe how you want y
> ordered.

Yes, I like that better too.

I wonder if we could/should rewrite all uses of DISTINCT into GROUP
BY under-the-hood...
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] distinct. Is this the correct behaviour?
Следующее
От: "Ansley, Michael"
Дата:
Сообщение: RE: [HACKERS] distinct. Is this the correct behaviour?