Re: DISTINCT ON without ORDER BY

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: DISTINCT ON without ORDER BY
Дата
Msg-id 20090422062724.GA21883@svana.org
обсуждение исходный текст
Ответ на Re: DISTINCT ON without ORDER BY  (Jasen Betts <jasen@xnet.co.nz>)
Список pgsql-general
On Tue, Apr 21, 2009 at 12:11:26PM +0000, Jasen Betts wrote:
> > Is there a way to acheive the above result without a sort and without a
> > self-join?
>
> anyway you could possibly write an agregate function that returns a
> copy of the row with the highest id?

Put that way it sounds like something for a window function. Not sure
if they can use a HashAggrgate though.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: No connection could be made because the target machine actively refused it
Следующее
От: Emi Lu
Дата:
Сообщение: What may cause - Connection rejected: FATAL: Ident authentication failed for user?