Re: Add missing CREATE TABLE IF NOT EXISTS table_name AS EXECUTEquery;

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add missing CREATE TABLE IF NOT EXISTS table_name AS EXECUTEquery;
Дата
Msg-id 20190206114912.GE14980@paquier.xyz
обсуждение исходный текст
Ответ на Add missing CREATE TABLE IF NOT EXISTS table_name AS EXECUTE query;  (Andreas Karlsson <andreas@proxel.se>)
Ответы Re: Add missing CREATE TABLE IF NOT EXISTS table_name AS EXECUTEquery;  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
On Wed, Feb 06, 2019 at 03:20:41AM +0100, Andreas Karlsson wrote:
> The first example below works while the second one is a syntax error despite
> that the documentation
> (https://www.postgresql.org/docs/11/sql-createtableas.html) makes it seem
> like both should be valid. I do not see any reason to not support CTAS with
> both IF NOT EXISTS and EXECUTE at the same time so I am guessing that this
> was an oversight.

Agreed, good catch.

> I have attached a patch which fixes this. What do you think? Should I add a
> new test case for this or is the change simple enough to not require any new
> test?

A test case in select_into.sql would be nice.  Should we back-patch
that?  It seems to me that this qualifies as a bug fix, and I don't
see a reason to not support it knowing that we have the infrastructure
for that.
--
Michael

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: fast defaults in heap_getattr vs heap_deform_tuple
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: fast defaults in heap_getattr vs heap_deform_tuple