From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Michael Glaesemann" <grzm(at)myrealbox(dot)com>, "Andrew Dunstan" <andrew(at)dunslane(dot)net> |
Cc: | "Patches \(PostgreSQL\)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: drop if exists |
Date: | 2005-11-14 15:12:04 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E4E7DFD6@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
> -----Original Message-----
> From: pgsql-patches-owner(at)postgresql(dot)org
> [mailto:pgsql-patches-owner(at)postgresql(dot)org] On Behalf Of
> Michael Glaesemann
> Sent: 14 November 2005 14:54
> To: Andrew Dunstan
> Cc: Patches (PostgreSQL)
> Subject: Re: [PATCHES] drop if exists
>
>
> 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.
Yes, a notice would certainly be nice:
andrew=# drop table blurflx;
ERROR: table "blurflx" does not exist
andrew=# drop table if exists blurflx;
NOTICE: table "blurflx" does not exist
DROP TABLE
Regards, Dave.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-11-14 15:21:50 | Re: drop if exists |
Previous Message | Michael Glaesemann | 2005-11-14 14:53:45 | Re: drop if exists |