Re: orphaned trigger

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jonathan Ellis <jellis(at)advocast(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: orphaned trigger
Date: 2001-05-16 23:32:34
Message-ID: Pine.BSF.4.21.0105161628310.30350-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 16 May 2001, Jonathan Ellis wrote:

> > > Would manually
> > > removing it from pg_trigger cause Bad Things to happen?
> >
> > Yes, and you'll need to double quote the trigger name.
> > try
> > drop trigger "RI_ConstraintTrigger_44349" on users;
>
> That worked. Why was that?

It's a mixed case thing. The name of the constraint is actually
RI_ConstraintTrigger_44349 (with that casing). When you specify
it without the quotes, postgres lowercases it to
ri_constrainttrigger_44349 and fails to find it.

> > How did you drop the table? Did you reload a dump file (like the one that
> > referenced it)?
>
> I'm afraid I don't understand the question. I dropped it with drop table.
> Although thinking back on it, the drop may have been on 7.0.2. Can't
> remember whether that was before or after upgrading...

Wait, okay, I think I know what happened. There was a problem with 7.0.?
dumps not having the information about the "other" table in the references
constraint written out so when you dropped the table it didn't realize
it needed to drop the trigger. You may want to drop the constraint
triggers and recreate them with alter table add constraint.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-05-17 00:53:07 Re: Unusual slowdown using subselects
Previous Message Tom Lane 2001-05-16 22:59:40 Re: date bug