Re: [HACKERS] dropdb and dropuser: IF EXISTS

2011-08-30 Thread Robert Haas
On Tue, Aug 30, 2011 at 12:44 PM, Josh Kupershmidt wrote: > On Tue, Aug 30, 2011 at 11:14 AM, Robert Haas wrote: >> Committed with some edits.  I stole the documentation language from >> the DROP DATABASE and DROP USER pages and just copied it over, instead >> of saying the same thing in differen

Re: [HACKERS] dropdb and dropuser: IF EXISTS

2011-08-30 Thread Josh Kupershmidt
On Tue, Aug 30, 2011 at 11:14 AM, Robert Haas wrote: > Committed with some edits.  I stole the documentation language from > the DROP DATABASE and DROP USER pages and just copied it over, instead > of saying the same thing in different words.  And I rearranged the > options handling to be more con

Re: [HACKERS] dropdb and dropuser: IF EXISTS

2011-08-30 Thread Robert Haas
On Mon, Aug 29, 2011 at 7:34 PM, Josh Kupershmidt wrote: > On Fri, Aug 26, 2011 at 10:42 PM, Robert Haas wrote: >> +1 for --if-exists, but -X isn't doing a lot for me, especially since >> we've used -X for other purposes in other commands.  I'd just skip >> having a short form for this one. > > F

Re: [HACKERS] dropdb and dropuser: IF EXISTS

2011-08-29 Thread Josh Kupershmidt
On Fri, Aug 26, 2011 at 10:42 PM, Robert Haas wrote: > +1 for --if-exists, but -X isn't doing a lot for me, especially since > we've used -X for other purposes in other commands.  I'd just skip > having a short form for this one. Fine by me. Updated patch attached. Josh diff --git a/doc/src/sgml

Re: [HACKERS] dropdb and dropuser: IF EXISTS

2011-08-26 Thread Robert Haas
On Fri, Aug 26, 2011 at 12:08 AM, Josh Kupershmidt wrote: > I noticed a few places where it would be handy if dropdb took a flag > like "--if-exists" which would basically just add in the 'IF EXISTS' > clause to the DROP DATABASE statement. For example, scripts like > find_static or mbregress.sh u

[HACKERS] dropdb and dropuser: IF EXISTS

2011-08-25 Thread Josh Kupershmidt
I noticed a few places where it would be handy if dropdb took a flag like "--if-exists" which would basically just add in the 'IF EXISTS' clause to the DROP DATABASE statement. For example, scripts like find_static or mbregress.sh use dropdb && createdb, but they generate noisy errors from dropdb w