Looks heap_create_with_catalog ignored the if_not_exists options

Поиск
Список
Период
Сортировка
От Andy Fan
Тема Looks heap_create_with_catalog ignored the if_not_exists options
Дата
Msg-id CAKU4AWpGFMgp3zF-8TUkpydPZ5kJcY-yWcdN92mwRnSbJW2zhQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Looks heap_create_with_catalog ignored the if_not_exists options
Список pgsql-hackers
for a createStmt,  it will call transformCreateStmt,  and then heap_create_with_catalog. 
but looks it just check the if_not_exists in transformCreateStmt.  

so there is a chance that when the transformCreateStmt is called, the table is not created, but before the heap_create_with_catalog is called,  the table was created.  if so, the "if not exits" will raise error  "ERROR:  relation "xxxx" already exists"

I can reproduce this with gdb, 

demo=# create table if not exists dddd2 (a int);
ERROR:  relation "dddd2" already exists

is it designed as this on purpose or is it a bug?

I am using the lates commit on github now. 

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

Предыдущее
От: Antonin Houska
Дата:
Сообщение: Re: Problems with plan estimates in postgres_fdw
Следующее
От: Švorc Martin
Дата:
Сообщение: pg_background and BGWH_STOPPED