BUG #7515: DROP TABLE IF EXISTS fails if schema does not exist

Поиск
Список
Период
Сортировка
От james@illusorystudios.com
Тема BUG #7515: DROP TABLE IF EXISTS fails if schema does not exist
Дата
Msg-id E1T8EAI-0006kH-Ro@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7515
Logged by:          James Bellinger
Email address:      james@illusorystudios.com
PostgreSQL version: 9.1.5
Operating system:   Ubuntu Linux 12.04 Server
Description:        =


If the table being referenced has a schema in its name, and the schema does
not exist, DROP TABLE IF EXISTS will have an ERROR instead of a NOTICE.

So for instance,
DROP TABLE IF EXISTS bar;
This is a NOTICE if bar does not exist.

DROP TABLE IF EXISTS foo.bar;
This is an ERROR if foo does not exist, even though that implies bar does
not exist which means it should be a NOTICE.

Saw this because it was making a drop/recreate transaction fail on me, after
I changed some code to use a schema.

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

Предыдущее
От: katsuhito.habaguchi@fujixerox.co.jp
Дата:
Сообщение: BUG #7517: terminated by exception 0xC0000409
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: BUG #7517: terminated by exception 0xC0000409