Re: Accessing RECORD variable info

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Accessing RECORD variable info
Дата
Msg-id 20295.1170611773@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Accessing RECORD variable info  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы If Statement  ("Greg Quinn" <greg@officium.co.za>)
Список pgsql-novice
Andreas Kretschmer <akretschmer@spamfence.net> writes:
> Derrick Betts <list@blueaxis.com> schrieb:
>> How can I determine the actual field name and the field value for the record
>> variable (rec) if I were to look in index 1 or 2 or 3 of the variable?

> Unfortunately you can't access to row-index, you need the name of the
> column.

plpgsql is not designed for that sort of thing; despite the existence of
"record" variables, it's really a strongly typed language and doesn't
cope well with fields of variable data types.  Consider using one of the
other PLs instead (plperl, plpython, etc depending on which language you
like best).  Most of them can handle this easily.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: connection timeout?
Следующее
От: "Greg Quinn"
Дата:
Сообщение: If Statement