Re: add additional options to CREATE TABLE ... AS

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: add additional options to CREATE TABLE ... AS
Дата
Msg-id 1140025131.12131.66.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: add additional options to CREATE TABLE ... AS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Tue, 2006-02-14 at 15:38 -0500, Tom Lane wrote:
> Neil Conway <neilc@samurai.com> writes:
> > The implementation is pretty ugly -- it clutters ExecuteStmt and Query
> > with fields that really do not belong there. Per previous discussion, I
> > think it would be better to refactor the CREATE TABLE AS implementation
> > to be essentially a CREATE TABLE followed by a INSERT ... SELECT.
>
> I kinda wonder why bother at all.  I don't see any good reason why
> people shouldn't issue two statements.

The good reason is that CREATE plus INSERT SELECT is extremely bug prone
and very annoying to have to code SQL that way. CTAS is sent from on
high, IMHO, even without the performance optimisation.

Best Regards, Simon Riggs


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: add additional options to CREATE TABLE ... AS
Следующее
От: Stephen Frost
Дата:
Сообщение: BUG #2246: Only call pg_fe_getauthname if none given