Re: plpgsql select into

Поиск
Список
Период
Сортировка
От Roger Mason
Тема Re: plpgsql select into
Дата
Msg-id y657dggnn9f.fsf@mun.ca
обсуждение исходный текст
Ответ на Re: plpgsql select into  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: plpgsql select into  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: plpgsql select into  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-novice
Hello Tom & Laurenz,

Thanks for your responses.

Laurenz Albe writes:

> Omit "INTO tabular_info" from the query.
> RETURN QUERY already is a destination for the query result.

Yes, if I omit the INTO clause I get data returned.  So then how do I
insert the result of the plpgsql call into a table?  This is what
happens if I try calling 'select into' in psql:

select into info_table from (select get_info('1043_1')) as info_split;
SELECT 1288
test=> select * from info_table ;
--
(1288 rows)

How do I access the data in 'info_table'?

Thanks,
Roger



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: plpgsql select into
Следующее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql select into