Re: drop if exists - Mailing list pgsql-patches

From Michael Glaesemann
Subject Re: drop if exists
Date
Msg-id 6B04F21E-BAD7-473C-96F7-3EE349B0515B@myrealbox.com
Whole thread Raw
In response to drop if exists  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
On Nov 14, 2005, at 23:25 , Andrew Dunstan wrote:

>
> Ther attached patch is for comment. It implements "drop if exists"
> as has recently been discussed. Illustration:

Nifty! Thanks for working this up, Andrew!


> andrew=# drop table blurflx;
> ERROR:  table "blurflx" does not exist
> andrew=# drop table if exists blurflx;
> DROP TABLE

I'm not sure what other DBMS' return in this situation (and kindly
ignore this suggestion if it's specified or otherwise determined),
but perhaps the output could be TABLE "blurlx" DOES NOT EXIST
(without the ERROR) or something more informative, rather than DROP
TABLE. It reminds me of the old behavior of outputting COMMIT even in
the case of transaction failure. I find the current behavior of
outputting ROLLBACK in the case of transaction failure more useful.

Michael Glaesemann
grzm myrealbox com




pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: drop if exists
Next
From: "Dave Page"
Date:
Subject: Re: drop if exists