Re: Record type and ROW type in pl/pgsql functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Record type and ROW type in pl/pgsql functions
Дата
Msg-id 7946.1082464937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Record type and ROW type in pl/pgsql functions  (dinar@yantel.ru)
Список pgsql-bugs
dinar@yantel.ru writes:
> declare
> hosts_str mail_relayhosts%ROWTYPE;
> ...
> FOR hosts_str IN  SELECT hosts from mail_relayhosts LOOP

You would need SELECT * FROM here, if you're selecting the whole row.
This is going to try to stuff "hosts" into the first column of the
rowtype variable, which is the wrong datatype.  (I think it would then
complain about too few columns supplied, but it's not getting that far.)

            regards, tom lane

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

Предыдущее
От: dinar@yantel.ru
Дата:
Сообщение: Record type and ROW type in pl/pgsql functions
Следующее
От: Theo Kramer
Дата:
Сообщение: PQexecPrepared - PostgreSQL 7.4.1