Re: proposal: plpgsql - iteration over fields of rec or row variable

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: plpgsql - iteration over fields of rec or row variable
Дата
Msg-id AANLkTin1F0FW1hXjnRcc5x3KTfeAzs63NUaReH1XRM2y@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: plpgsql - iteration over fields of rec or row variable  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: plpgsql - iteration over fields of rec or row variable  (Dmitriy Igrishin <dmitigr@gmail.com>)
Список pgsql-hackers
> a) transformation to common type
>
> + simple - it is one day job - function record_to_array,
> array_to_record, and fieldnames_to_array
>  - lost of type info, hidden problems with IO cast - int a := 10.0/2.0
> is a problem
>
> using a plperl, pltcl is same like @a
>

I thinking about some simple API, that can be based on transformation
to text. It can be enough for almost all.

* text[] = record_to_array(record)
* table(id, key, datatype, value) = record_to_table(record)
* text = record_get_field(record, text)
* record = record_set_field(record, text, anyelement)

??

Pavel


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: plpgsql - iteration over fields of rec or row variable
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Query Plan Columns