Re: drop if exists - Mailing list pgsql-patches

From Tom Lane
Subject Re: drop if exists
Date
Msg-id 11272.1131981710@sss.pgh.pa.us
Whole thread Raw
In response to drop if exists  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: drop if exists
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> andrew=# drop table blurflx;
> ERROR:  table "blurflx" does not exist
> andrew=# drop table if exists blurflx;
> DROP TABLE

If I read MySQL's documentation correctly, they emit a NOTE (equivalent
of a NOTICE message I suppose) when IF EXISTS does nothing because the
table doesn't exist.  Seems like we should do likewise --- your second
example here seems actively misleading.  That is, I'd rather see

andrew=# drop table if exists blurflx;
NOTICE:  table "blurflx" does not exist, skipping
DROP TABLE


            regards, tom lane

pgsql-patches by date:

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