Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Date
Msg-id CA+TgmobMNeLP6nb=rNeKpcUZExv+SBXiOWsaw-nL4YPmF6d3Qg@mail.gmail.com
Whole thread Raw
In response to Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Jul 2, 2018 at 10:33 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> Yes, the original proposal was that we should be relaxed about it.

...in both directions i.e. DROP TABLE would work on a VIEW and DROP
VIEW on a table.  That definitely seems like it's going too far.

> Another possibility that would also seem to meet the OP's needs is to
> make it do this:
>
> DROP TABLE IF EXISTS X;
> NOTICE:  relation "X" is not a table, skipping
>
> His complaint was really that it generated an ERROR, IIUC.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Next
From: Robert Haas
Date:
Subject: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported