Record Types Structure in PL/pgSQL

Поиск
Список
Период
Сортировка
От Diego Sanchez R.
Тема Record Types Structure in PL/pgSQL
Дата
Msg-id 24b30c320706080514q163b556eoe80c02d044e509d5@mail.gmail.com
обсуждение исходный текст
Ответы Re: Record Types Structure in PL/pgSQL  ("Bart Degryse" <Bart.Degryse@indicator.be>)
Re: Record Types Structure in PL/pgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi there.

Is there any way of determining the actual structure of a record variable? E. g. I've written a small script to do some calculations  over some fields with a dinamically generated query. It looks like this:

create function foo(text) returns void as
$$
declare
a_record record;
my_query alias for $1;
begin
for a_record in execute my_query loop
-- Do some calculations
end loop;
return;
end;
$$
language plpgsql;


The question is: how could I possibly get the field names and other information about the record
a_record? I appreciate any suggestions or tips about this.

Best regards.


--
Diego M. Sánchez

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

Предыдущее
От: Gunther Mayer
Дата:
Сообщение: Apparent Wraparound?
Следующее
От: "Bart Degryse"
Дата:
Сообщение: Re: Record Types Structure in PL/pgSQL