From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Peter Moser <pitiz29a(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS |
Date: | 2018-07-03 02:33:46 |
Message-ID: | CA+TgmobMNeLP6nb=rNeKpcUZExv+SBXiOWsaw-nL4YPmF6d3Qg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 2, 2018 at 10:33 PM, Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-07-03 02:49:35 | Re: Remove mention in docs that foreign keys on partitioned tables are not supported |
Previous Message | Robert Haas | 2018-07-03 02:33:01 | Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS |