Accessing RECORD variable info

Поиск
Список
Период
Сортировка
От Derrick Betts
Тема Accessing RECORD variable info
Дата
Msg-id 0bd901c74830$a0eee7b0$0202a8c0@main
обсуждение исходный текст
Ответ на connection timeout?  (Frank Bax <fbax@sympatico.ca>)
Ответы Re: Accessing RECORD variable info
Список pgsql-novice
I have the following in a plpgsql function:
 
DECLARE
rec RECORD;
 
BEGIN
FOR rec IN EXECUTE 'SELECT * FROM '||table[1]
LOOP
  --use the results here
END LOOP;
 
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?
As you can see from the snippet of the function, the table that will be queried is dynamic and as such so are the names of the fields the rec variable will be returning.
 
Thank you,
Derrick

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

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: connection timeout?
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Accessing RECORD variable info