Re: SELECT INTO and ON COMMIT
От
Bruce Momjian
Тема
Re: SELECT INTO and ON COMMIT
Дата
Msg-id
20150514002243.GB15031@momjian.us
Ответ на
Re: SELECT INTO and ON COMMIT (Yves Dorfsman)
Список
Дерево обсуждения
SELECT INTO and ON COMMIT Yves Dorfsman <yves@zioup.com>
Re: SELECT INTO and ON COMMIT Bruce Momjian <bruce@momjian.us>
Re: SELECT INTO and ON COMMIT "David G. Johnston" <david.g.johnston@gmail.com>
Re: SELECT INTO and ON COMMIT Yves Dorfsman <yves@zioup.com>
Re: SELECT INTO and ON COMMIT Bruce Momjian <bruce@momjian.us>
Re: SELECT INTO and ON COMMIT Tom Lane <tgl@sss.pgh.pa.us>
Re: SELECT INTO and ON COMMIT Melvin Davidson <melvin6925@gmail.com>
Re: SELECT INTO and ON COMMIT Alvaro Herrera <alvherre@2ndquadrant.com>
On Wed, May 13, 2015 at 06:05:43PM -0600, Yves Dorfsman wrote: > > On Wed, May 13, 2015 at 05:29:36PM -0600, Yves Dorfsman wrote: > > Is there any way to add an ON COMMIT clause to a SELECT INTO TEMP TABLE? > > On 2015-05-13 17:56, David G. Johnston wrote: > > From the documentation of SELECT INTO > > > > " > > The PostgreSQL usage of SELECT INTO to represent table creation is historical. > > It is best to use CREATE TABLE AS for this purpose in new code. > > " > > > > http://www.postgresql.org/docs/9.4/interactive/sql-createtableas.html > > > > Which effectively means consider the feature deprecated. Especially since > > CREATE TABLE is standard conforming and SELECT INTO is not. > > Ah! This works. Thanks. > > Will `SELECT INTO` be deprecated? It is very convenient when writing pgplsql > functions, to select into a record. The pl/psql `SELECT INTO` is not related to the SQL SELECT INTO command --- yeah, confusing, so no, the pl/psql ability is not deprecated. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-general по дате отправления