Re: Turning column into *sorted* array?

Поиск
Список
Период
Сортировка
От PFC
Тема Re: Turning column into *sorted* array?
Дата
Msg-id op.sqzf0iuuth1vuj@localhost
обсуждение исходный текст
Ответ на Turning column into *sorted* array?  ("Felix E. Klee" <felix.klee@inka.de>)
Ответы Re: Turning column into *sorted* array?
Список pgsql-sql

> SELECT array_accum(x) FROM (SELECT * FROM some_view ORDER BY x) AS tmp;
If you're using integers, you could use the int_array_accum or something  from the intarray module which is a lot
faster.Ibelieve intarray also has a function for sorting integer arrays...
 

>
> BTW, the best alternative (in terms of execution performance) that comes
> into my mind is to create an aggregate that does the sorting right away
> while the values "come in" from the rows.  But that'd probably take me
> some time to get right.
>




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

Предыдущее
От: Ragnar Hafstað
Дата:
Сообщение: Re: Changed to: how to solve the get next 100 records problem
Следующее
От: "Felix E. Klee"
Дата:
Сообщение: Re: Turning column into *sorted* array?