Re: orphaned RI constraints

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Somazx Interesting <somazx(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: orphaned RI constraints
Date: 2001-07-09 18:10:34
Message-ID: Pine.BSF.4.21.0107091108140.88131-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 9 Jul 2001, Somazx Interesting wrote:

> At 01:30 PM 7/6/2001 -0700, you wrote:
> >To fix it, you should be able to use DROP TRIGGER on the appropriate
> >triggers that were created (you can find these through a select on
> >pg_trigger, using the tgargs to find the appropriate ones). As a warning,
> >you need to double quote the trigger name, so for example if you saw the
> >following rows for the constraint:
> >
> > 782359 | RI_ConstraintTrigger_782384 | 1654 | 9 | true |
> >true | <unnamed> | 782372 | false | false
> >| 6 | | <unnamed>\000qqq2\000qqq\000UNSPECIFIED\000a\000a\000
> > 782359 | RI_ConstraintTrigger_782386 | 1655 | 17 | true |
> >true | <unnamed> | 782372 | false | false
> >| 6 | | <unnamed>\000qqq2\000qqq\000UNSPECIFIED\000a\000a\000
> >
> >you should be able to do
> >DROP TRIGGER "RI_ConstraintTrigger_782384";
> >DROP TRIGGER "RI_ConstraintTrigger_782386";
>
> Hi,
>
> The above doesn't work for me since DROP TRIGGER requires an ON <table
> name> argument, and the table which the trigger is on has long since been
> dropped.
Right (forgot the on table). The triggers *on* the table that was dropped
should be gone, you should only be left with the triggers on the other
table of the constraint, so use that table's name (not the table you
dropped).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2001-07-09 18:24:00 Re: orphaned RI constraints
Previous Message Sullivan,Deric [CMC] 2001-07-09 18:05:59 Info regarding integrating a barcode reader with PostgreSQL