plpgsql select into with multiple target variables

Поиск
Список
Период
Сортировка
От John DeSoi
Тема plpgsql select into with multiple target variables
Дата
Msg-id E21F7476-716F-11D9-8D86-000A95B03262@pgedit.com
обсуждение исходный текст
Ответы Re: plpgsql select into with multiple target variables  (PFC <lists@boutiquenumerique.com>)
Список pgsql-sql
The docs say:

The result of a SELECT command yielding multiple columns (but  only one 
row) can be assigned to a record variable, row-type  variable, or list 
of scalar variables. This is done by:
SELECT INTO target  select_expressions  FROM ...;
where target can be a record variable, a row  variable, or a 
comma-separated list of simple variables and  record/row fields. The 
select_expressions  and the remainder of the command are the same as in 
regular SQL.

So, I'm trying to do the "list of scalar variables" target, but I can't 
get the syntax right. Something like

SELECT into varx, vary, varz,  colx, coly, colz, FROM ....

I've tried parens and various other things but no luck.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL



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

Предыдущее
От: Franco Bruno Borghesi
Дата:
Сообщение: Re: Calendar Function
Следующее
От: PFC
Дата:
Сообщение: Re: plpgsql select into with multiple target variables