BUG #16492: DROP VIEW IF EXISTS error
От
David G. Johnston
Тема
BUG #16492: DROP VIEW IF EXISTS error
Дата
Msg-id
CAKFQuwYGaaoF8XKWLOxGfjeFeUuH=wmwiDCgZz5e3SP34qJtGw@mail.gmail.com
Ответ на
Re: BUG #16492: DROP VIEW IF EXISTS error (Tom Lane)
Список
Дерево обсуждения
BUG #16492: DROP VIEW IF EXISTS error PG Bug reporting form <noreply@postgresql.org>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error Pavel Stehule <pavel.stehule@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error Nina Marlow <postgresql.2020@t-net.ruhr>
Re: BUG #16492: DROP VIEW IF EXISTS error Pavel Stehule <pavel.stehule@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #16492: DROP VIEW IF EXISTS error Nina Marlow <postgresql.2020@t-net.ruhr>
Re: BUG #16492: DROP VIEW IF EXISTS error Pavel Stehule <pavel.stehule@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error Pavel Stehule <pavel.stehule@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error Pavel Stehule <pavel.stehule@gmail.com>
Re: BUG #16492: DROP VIEW IF EXISTS error "David G. Johnston" <david.g.johnston@gmail.com>
On Sunday, June 14, 2020, Tom Lane <tgl@sss.pgh.pa.us> wrote:
What I'd prefer to see, I think, is a command DROP RELATION [IF EXISTS]
that is entirely un-picky about the object's relkind. Once upon a time
DROP TABLE worked that way, IIRC, but it was "improved" with little
thought about the needs of schema-update scripts
IMO if the DROP type IF EXISTS worked as expected the drop relation command would be undesirable - the use case being that there is a specific type of object the user was potentially expecting to exist that they want to ensure does not. If an object of a different typed gets matched for some reason it should not get dropped as a safety feature.
Unless drop relation is part of the SQL standard I’d suggest it is something to not implement on “don’t give users a loaded weapon” grounds. People aren’t clamoring for it and making the drop type if exists work in the proposed manner makes it possible to, if a bit verbosely, replicate the same behavior in the rare case it would be needed. The same rarity that is being used to defend not changing the behavior.
David J.
В списке pgsql-bugs по дате отправления