Re: sql scripts

From: "David F(dot) Skoll" <dfs(at)roaringpenguin(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: sql scripts
Date: 2003-10-20 17:30:23
Message-ID: Pine.LNX.4.58.0310201329190.5848@shishi.roaringpenguin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, 18 Oct 2003, Sam Carleton wrote:

> I am working on creating my first database in Postgres. In the
> script that will create all the tables for the firs time, I would
> like to have a conditional statement to delete a table, if it
> already exists.

As far as I know, there is no way to do that in PostgreSQL's standard
SQL language. But it doesn't matter -- as long as the DROP TABLE
command is in it's own transaction, you can unconditionally drop the table
and ignore any errors.

Regards,

David.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Hannu Krosing 2003-10-20 17:50:22 Re: [PERFORM] Low Insert/Update Performance
Previous Message scott.marlowe 2003-10-20 17:23:44 Re: Postgresql Memory Problem