Re: Chatter on DROP SOMETHING IF EXISTS
От | Peter Eisentraut |
---|---|
Тема | Re: Chatter on DROP SOMETHING IF EXISTS |
Дата | |
Msg-id | 200702081854.33886.peter_e@gmx.net обсуждение исходный текст |
Ответ на | Re: Chatter on DROP SOMETHING IF EXISTS (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: Chatter on DROP SOMETHING IF EXISTS
Re: Chatter on DROP SOMETHING IF EXISTS |
Список | pgsql-hackers |
Andrew Dunstan wrote: > Peter Eisentraut wrote: > > What is the practical purpose of the notices emitted by DROP > > SOMETHING IF EXISTS when the object in fact does not exist? > > It was asked for ... The argument was that MySQL does the same. Which is valid but not overriding. I'm honestly looking for some practical use of this. We have debated other NOTICE messages over the years, but they at least tell you something you can use after the command. In this case, it just tells you that the object which you wanted removed no matter what didn't exist in the first place, but the state after the command (which is the interesting side) is always the same: "gone". The only use case I see is informing about typos, but the system generally doesn't cater to that. The downside is that while I wanted to use the IF EXISTS form to reduce the chatter at the beginning of schema loading scripts, this just gives me a different spelling of that same chatter. -- Peter Eisentraut http://developer.postgresql.org/~petere/
В списке pgsql-hackers по дате отправления: