Skip site navigation (1) Skip section navigation (2)

Re: WIP: CREATE TABLE AS / WITH DATA

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>,pgsql-patches <pgsql-patches(at)postgresql(dot)org>,Gavin Sherry <swm(at)alcove(dot)com(dot)au>
Subject: Re: WIP: CREATE TABLE AS / WITH DATA
Date: 2004-09-23 04:15:44
Message-ID: 21576.1095912944@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> On Wed, 2004-09-22 at 23:00, Alvaro Herrera wrote:
>> Could that include supporting SELECT INTO as well as both types of
>> CREATE TABLE AS?

> Right; my thinking is to have the parser construct SELECT INTO as a
> CreateTableAsStmt. That way all the code for creating the "into"
> relation is centralized in one place.

Another thing that would be really nice would be to get rid of all the
warty special cases for SELECT INTO in executor/execMain.c.  I have
thought about handling this stuff in a new tuple receiver type (cf
tcop/dest.h, dest.c) but haven't really pursued it.  I also have some
old notes suggesting that we should merge this into INSERT/SELECT,
but that stuff has enough warts of its own that I'm not sure it's a
good path to pursue.

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Gavin SherryDate: 2004-09-23 04:37:31
Subject: Re: WIP: CREATE TABLE AS / WITH DATA
Previous:From: Neil ConwayDate: 2004-09-23 04:02:49
Subject: Re: WIP: CREATE TABLE AS / WITH DATA

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group