Re: Chatter on DROP SOMETHING IF EXISTS - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Chatter on DROP SOMETHING IF EXISTS
Date
Msg-id 200702081854.33886.peter_e@gmx.net
Whole thread Raw
In response to Re: Chatter on DROP SOMETHING IF EXISTS  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Chatter on DROP SOMETHING IF EXISTS  (Andrew Dunstan <andrew@dunslane.net>)
Re: Chatter on DROP SOMETHING IF EXISTS  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Marc Munro
Date:
Subject: Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)
Next
From: Andrew Dunstan
Date:
Subject: Re: Chatter on DROP SOMETHING IF EXISTS