Re: identifying duplicate RI triggers

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: culley harrelson <culley(at)ml1(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: identifying duplicate RI triggers
Date: 2002-11-08 17:17:23
Message-ID: 20021108091612.A12143-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 8 Nov 2002, culley harrelson wrote:

> I started looking at the RI triggers in a database that started in 7.0.
> Over time has been migrated to 7.1, 7.2, and 7.2.3 and I think all the
> dumping and reloading has left me with some extra triggers. When do see
> this:
>
> siteadmin=# select tgname, tgargs from pg_trigger where tgname in
> ('RI_ConstraintTrigger_1462942','RI_ConstraintTrigger_1462994');
> tgname |
> tgargs
> ------------------------------+-----------------------------------------------------------------------------------------
> RI_ConstraintTrigger_1462942 |
> <unnamed>\000fe_user\000fe_user_type\000UNSPECIFIED\000user_type_id\000user_type_id\000
> RI_ConstraintTrigger_1462994 |
> <unnamed>\000fe_user\000fe_user_type\000UNSPECIFIED\000user_type_id\000user_type_id\000
> (2 rows)

You can't just use those, you also need to look at least at tgfoid.
There are generally 3 triggers per constraint that IIRC all have
the same args but different function oids.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tara Piorkowski 2002-11-08 17:19:16 Re: [GENERAL] PostgreSQL v7.3b5 Packaged for Testing ...
Previous Message Bruce Momjian 2002-11-08 17:14:59 Re: Win2K Questions