Re: Looks heap_create_with_catalog ignored the if_not_exists options

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Looks heap_create_with_catalog ignored the if_not_exists options
Дата
Msg-id 20190301123506.GA1543@paquier.xyz
обсуждение исходный текст
Ответ на Looks heap_create_with_catalog ignored the if_not_exists options  (Andy Fan <zhihui.fan1213@gmail.com>)
Ответы Re: Looks heap_create_with_catalog ignored the if_not_exists options
Список pgsql-hackers
On Fri, Mar 01, 2019 at 07:17:04PM +0800, Andy Fan wrote:
> for a createStmt,  it will call transformCreateStmt,  and then
> heap_create_with_catalog.
> but looks it just check the if_not_exists in transformCreateStmt.
>
> is it designed as this on purpose or is it a bug?

That's a bug.  Andreas Karlsson and I have been discussing it a couple
of days ago actually:
https://www.postgresql.org/message-id/20190215081451.GD2240@paquier.xyz

Fixing this is not as straight-forward as it seems, as it requires
shuffling a bit the code related to a CTAS creation so as all code
paths check at the same time for an existing relation.  Based on my
first impressions, I got the feeling that it would be rather invasive
and not worth a back-patch.
--
Michael

Вложения

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

Предыдущее
От: "Matsumura, Ryo"
Дата:
Сообщение: RE: SQL statement PREPARE does not work in ECPG
Следующее
От: David Rowley
Дата:
Сообщение: Re: using index or check in ALTER TABLE SET NOT NULL