Re: How to split an array into columns

Поиск
Список
Период
Сортировка
От Paul A Jungwirth
Тема Re: How to split an array into columns
Дата
Msg-id CA+renyV+kFyKvydAT3Fm871ubL8VB4dRdm6N2arD4i-NMWE96A@mail.gmail.com
обсуждение исходный текст
Ответ на How to split an array into columns  ("a" <372660931@qq.com>)
Список pgsql-general
On Fri, Aug 24, 2018 at 2:01 AM, a <372660931@qq.com> wrote:
>
> Say if I have an float8 array:
>
> id| data
> --|---------------
> a | {1,2}
> b | {2,4}
>
> . . .
>
> Since I would have around 200,000 rows, I would prefer it having enough capacity to carry out the calculation such as
sum().

Is this something that would help you?:

https://github.com/pjungwir/aggs_for_vecs

(also on pgxn: https://pgxn.org/dist/aggs_for_vecs)

It would let you say `SELECT vec_to_sum(data)` and get `{3,6}`.

Paul


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hungarian collation in English Windows server
Следующее
От: David Gauthier
Дата:
Сообщение: unorthodox use of PG for a customer