From: | james(at)illusorystudios(dot)com |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #7515: DROP TABLE IF EXISTS fails if schema does not exist |
Date: | 2012-09-02 17:40:54 |
Message-ID: | E1T8EAI-0006kH-Ro@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
The following bug has been logged on the website:
Bug reference: 7515
Logged by: James Bellinger
Email address: james(at)illusorystudios(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | pgmail | 2012-09-03 15:23:11 | BUG #7516: PL/Perl crash |
Previous Message | Bruce Momjian | 2012-09-01 16:14:04 | Re: BUG #7507: pg_restore silently fails when restoring a db with the --create flag and no user. |
From | Date | Subject | |
---|---|---|---|
Next Message | Kohei KaiGai | 2012-09-02 18:41:04 | [bugfix] sepgsql missed a case of CREATE TABLE AS |
Previous Message | Tom Lane | 2012-09-02 17:13:52 | Re: Yet another failure mode in pg_upgrade |