From: | Yves Dorfsman <yves(at)zioup(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SELECT INTO and ON COMMIT |
Date: | 2015-05-14 00:05:43 |
Message-ID: | 5553E6D7.6050002@zioup.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
--
http://yves.zioup.com
gpg: 4096R/32B0F416
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2015-05-14 00:07:19 | Re: Thousands of schemas and ANALYZE goes out of memory |
Previous Message | David G. Johnston | 2015-05-13 23:56:20 | Re: SELECT INTO and ON COMMIT |