Re: Can't get rid of constraint

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Matthew Price <pricem(at)juno(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Can't get rid of constraint
Date: 2002-02-28 21:27:49
Message-ID: 20020228132352.F21767-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 28 Feb 2002, Matthew Price wrote:

> Howdy,
> I had a table in my database that reference another like:
>
> create table a (1 int, 2 int);
> create table b (1 int references a(1));
>
> recently i had to do a:
> drop table b;
>
> now i can't:
> delete from a where 1='5';
>
> because i get:
> ERROR: Relation 'b' does not exist
>
> How do I get rid of this zombie constraint?

There are two triggers on a that do the constraint, if you
drop the triggers with drop trigger (you'll need to double
quote the names) you should be fine.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-02-28 21:40:20 Re: GROUPing by expressions, and subSELECTs
Previous Message Matthew Price 2002-02-28 21:00:12 Can't get rid of constraint