Ther attached patch is for comment. It implements drop if exists as
has recently been discussed. Illustration:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
DROP TABLE
andrew=# create table blurflx ( x text);
CREATE TABLE
andrew=#
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
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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
Andrew Dunstan [EMAIL PROTECTED] 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
OK, now it looks like this:
andrew=# drop table blurflx;
ERROR: table blurflx does not exist
andrew=# drop table if exists blurflx;
NOTICE: table blurflx does not exist, skipping
DROP TABLE
andrew=# create table blurflx ( x text);
CREATE TABLE
andrew=# drop table if exists blurflx;
DROP TABLE