pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRequest new version to support "on commit drop" for create temp table ... as select ?
5+ messages / 3 participants
[nested] [flat]
* Request new version to support "on commit drop" for create temp table ... as select ?
@ 2009-07-14 15:08 Emi Lu <emilu@encs.concordia.ca>
2009-07-14 16:47 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Emi Lu @ 2009-07-14 15:08 UTC (permalink / raw)
To: pgsql-sql
Good morning,
I googled to find that "on commit drop" does not support:
(a) create temp table as select * from table1 where 1<>2;
http://archives.postgresql.org/pgsql-sql/2005-09/msg00153.php
If table1 has complex table structure, grammar(a) will save lots of
codes - col1 varchar(1), col2, ..... colN
I just wonder would the new version support "on commit drop" for select?
Thanks a lot!
--
Lu Ying
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Request new version to support "on commit drop" for create temp table ... as select ?
2009-07-14 15:08 Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
@ 2009-07-14 16:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 17:33 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2009-07-14 16:47 UTC (permalink / raw)
To: emilu@encs.concordia.ca; +Cc: pgsql-sql
Emi Lu <emilu@encs.concordia.ca> writes:
> I googled to find that "on commit drop" does not support:
> (a) create temp table as select * from table1 where 1<>2;
> http://archives.postgresql.org/pgsql-sql/2005-09/msg00153.php
Ah, the pitfalls of believing that the first google hit you get
is authoritative. Didn't you notice that message was from 2005?
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Request new version to support "on commit drop" for create temp table ... as select ?
2009-07-14 15:08 Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
2009-07-14 16:47 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2009-07-14 17:33 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-07-14 17:38 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Scott Marlowe @ 2009-07-14 17:33 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: emilu@encs.concordia.ca; pgsql-sql
On Tue, Jul 14, 2009 at 10:47 AM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
> Emi Lu <emilu@encs.concordia.ca> writes:
>> I googled to find that "on commit drop" does not support:
>
>> (a) create temp table as select * from table1 where 1<>2;
>> http://archives.postgresql.org/pgsql-sql/2005-09/msg00153.php
>
> Ah, the pitfalls of believing that the first google hit you get
> is authoritative. Didn't you notice that message was from 2005?
That's what I thought, but
create temp table xyz as select * from abc on commit drop;
still fails on 8.3. Was this fixed in 8.4 or is my syntax wonky?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Request new version to support "on commit drop" for create temp table ... as select ?
2009-07-14 15:08 Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
2009-07-14 16:47 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 17:33 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Scott Marlowe <scott.marlowe@gmail.com>
@ 2009-07-14 17:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 18:52 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2009-07-14 17:38 UTC (permalink / raw)
To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: emilu@encs.concordia.ca; pgsql-sql
Scott Marlowe <scott.marlowe@gmail.com> writes:
> That's what I thought, but
> create temp table xyz as select * from abc on commit drop;
> still fails on 8.3. Was this fixed in 8.4 or is my syntax wonky?
Your syntax is wonky -- switch the clause order.
http://www.postgresql.org/docs/8.3/static/sql-createtableas.html
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Request new version to support "on commit drop" for create temp table ... as select ?
2009-07-14 15:08 Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
2009-07-14 16:47 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 17:33 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Scott Marlowe <scott.marlowe@gmail.com>
2009-07-14 17:38 ` Re: Request new version to support "on commit drop" for create temp table ... as select ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2009-07-14 18:52 ` Emi Lu <emilu@encs.concordia.ca>
0 siblings, 0 replies; 5+ messages in thread
From: Emi Lu @ 2009-07-14 18:52 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Scott Marlowe <scott.marlowe@gmail.com>; pgsql-sql
Got it. Thank you Tom!
> Scott Marlowe <scott.marlowe@gmail.com> writes:
>> That's what I thought, but
>
>> create temp table xyz as select * from abc on commit drop;
>
>> still fails on 8.3. Was this fixed in 8.4 or is my syntax wonky?
>
> Your syntax is wonky -- switch the clause order.
> http://www.postgresql.org/docs/8.3/static/sql-createtableas.html
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2009-07-14 18:52 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 15:08 Request new version to support "on commit drop" for create temp table ... as select ? Emi Lu <emilu@encs.concordia.ca>
2009-07-14 16:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 17:33 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-07-14 17:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2009-07-14 18:52 ` Emi Lu <emilu@encs.concordia.ca>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox