Re: drop table if exists - Mailing list pgsql-novice

From Kevin Coyner
Subject Re: drop table if exists
Date
Msg-id 20030314114614.GC20154@rustybear.com
Whole thread Raw
In response to drop table if exists  (Kevin Coyner <kevin@rustybear.com>)
Responses Re: drop table if exists
Re: drop table if exists
List pgsql-novice

On Wed, Mar 05, 2003 at 02:09:03PM -0500, Kevin Coyner wrote......

>
> In MySQL, when I create a new table from a .sql file, I usually start
> with:
>
> DROP TABLE IF EXISTS sometable;
> CREATE TABLE sometable(
>
>
> This doesn't work in Postgres and I haven't been able to find the
> equivalent in the docs.  If I try to drop a table that doesn't exist, I
> get an error message, so having that modifier "... if exists ..." is
> nice.
>
> Is there an equivalent to "IF EXISTS" in Postgres?


No thoughts about this one?

Thanks
Kevin

--
Kevin Coyner
mailto: kevin@rustybear.com
GnuPG key: 1024D/8CE11941

pgsql-novice by date:

Previous
From: Vittorio Zuccala'
Date:
Subject: Re: Pgaccess doesn't connect
Next
From: Aarni Ruuhimäki
Date:
Subject: Re: drop table if exists