dropping non-existent tables

From: "Walsh, Richard (Richard)" <richardwalsh(at)avaya(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: dropping non-existent tables
Date: 2005-07-26 16:04:08
Message-ID: 73E4F3992055E8429385A496BCCC90EC1073F08E@bg0007avexu1.global.avaya.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I have a problem in that I need to drop non-existent tables in a DDL
script. This is in order that the script can re-build a database schema
if the tables already exist. However, in Postgres this is proving to be
a problem because if the table does not exist then the DDL execution
will stop once it gets an error. I know that I can create a custom
function that will check the relevant postGres table to see if the table
already exists, but I don't want to do this as I would like to keep the
DDL as non-proprietary as possible. Anyone any ideas on a work-around
for this problem that does not involve creating a custom function.
thanks,
Richie.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dr NoName 2005-07-26 16:08:32 Re: transaction timeout
Previous Message Dr NoName 2005-07-26 16:00:49 Re: transaction timeout