Re: plpgsql select into

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: plpgsql select into
Дата
Msg-id CAKFQuwZPhqn1zF-zcOFXBrch2fqqAfFr5LVAhhiSR_xqXyMcCQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plpgsql select into  (Roger Mason <rmason@mun.ca>)
Ответы Re: plpgsql select into  (Roger Mason <rmason@mun.ca>)
Список pgsql-novice
On Fri, Aug 20, 2021 at 8:51 AM Roger Mason <rmason@mun.ca> wrote:
select into info_table from (select get_info('1043_1')) as info_split;

I suggest you should pretend that SQL's "SELECT INTO" doesn't exist.  If you want to create a table from a result write: "CREATE TABLE AS" and then a normal select query.  In particular the entire "action" command is kept whole instead of needing to put a bunch of column names in between the "SELECT" and the "INTO" - and you also are less likely to confuse the plpgsql feature of the same form.

David J.

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

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