Re: Error dropping non-existent tables - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Error dropping non-existent tables
Date
Msg-id 20041120165113.GA23127@wolff.to
Whole thread Raw
In response to Error dropping non-existent tables  (Baldeep Hira <baldeephira@gmail.com>)
Responses Re: Error dropping non-existent tables
List pgsql-general
On Fri, Nov 19, 2004 at 21:38:33 -0800,
  Baldeep Hira <baldeephira@gmail.com> wrote:
>
> I am able to drop tables in PostgreSQL, but the problem arises when
> the table does not exist and I try to execute a "drop table" command.

The simplest fix is to do the drop table outside of a transaction (so
that the error in the drop doesn't break the rest of your script).
If that won't work for you then you can write a custom function that
looks in the system catalog to see if the table exists before trying
the drop.

pgsql-general by date:

Previous
From: Sebastian Böck
Date:
Subject: infinite recursion detected in rules for relation "..."
Next
From: Tom Lane
Date:
Subject: Re: infinite recursion detected in rules for relation "..."