Re: BUG #16492: DROP VIEW IF EXISTS error
От | Tom Lane |
---|---|
Тема | Re: BUG #16492: DROP VIEW IF EXISTS error |
Дата | |
Msg-id | 1050585.1592154735@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #16492: DROP VIEW IF EXISTS error ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: BUG #16492: DROP VIEW IF EXISTS error
BUG #16492: DROP VIEW IF EXISTS error Re: BUG #16492: DROP VIEW IF EXISTS error |
Список | pgsql-bugs |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > How is the proposed behavior more risky? And no, the current behavior does > not have any uniquely practical use. Its only benefit is that it is how > things have worked forever and that is only because its flaws are rarely > encountered in practice. I'm a little skeptical about the proposed change being of any benefit. The usual reason for doing DROP IF EXISTS is that you're about to replace the object. It will not help for the DROP to succeed if the conflicting object is still there, because the CREATE is going to fail anyway. Thus, the most likely effect of such a change is that we fix no scripts, while breaking any scripts that were dependent on the existing behavior. 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. regards, tom lane
В списке pgsql-bugs по дате отправления: