| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера