Proposal: casts row to array and array to row

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Proposal: casts row to array and array to row
Дата
Msg-id CAFj8pRBOUc8Y2f7qnENCuNFjmC1wwS5z_GpQwWv5OLWqmV=Bvw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Proposal: casts row to array and array to row
Re: Proposal: casts row to array and array to row
Re: Proposal: casts row to array and array to row
Список pgsql-hackers
Hello

A current limits of dynamic work with row types in PL/pgSQL can be
decreased with a possible casts between rows and arrays. Now we have a
lot of tools for arrays, and these tools should be used for rows too.

postgres=# \d mypoint
Composite type "public.mypoint"Column │  Type   │ Modifiers
────────┼─────────┼───────────a      │ integer │b      │ integer │

postgres=# select cast(rmypoint '(10,20) as int[]);  array
────────────{10,20}
(1 row)

postgres=# select cast(ARRAY[10,20] AS mypoint);mypoint
─────────(10,20)
(1 row)

What do you think about this idea?

Regards

Pavel Stehule

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [v9.2] make_greater_string() does not return a string in some cases
Следующее
От: Jun Ishiduka
Дата:
Сообщение: Re: Online base backup from the hot-standby