Re: distinct on doesn't fail without order by? why?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: distinct on doesn't fail without order by? why?
Дата
Msg-id 2750.1242687460@sss.pgh.pa.us
обсуждение исходный текст
Ответ на distinct on doesn't fail without order by? why?  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-bugs
hubert depesz lubaczewski <depesz@depesz.com> writes:
> I was under impression that select distinct on (xx) ...
> will fail if xx doesn't match the left most part of order by. i.e. it
> requires order by xx, while allowing order by xx, something, else.

No, it requires that *if* you specify an ORDER BY, it agrees with
the DISTINCT ON.

            regards, tom lane

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: distinct on doesn't fail without order by? why?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #4812: statistics not available on tables containing only hstore column