From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | culley harrelson <culley(at)ml1(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: identifying duplicate RI triggers |
Date: | 2002-11-08 20:49:47 |
Message-ID: | 27582.1036788587@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> 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.
I think looking at tgtype would also serve to distinguish the three
triggers associated with an RI constraint.
In 7.3, management of RI triggers is a lot easier because the system
associates the triggers with a pg_constraint entry (pg_constraint is
a new system catalog). There is a contrib module contrib/adddepend
that tries to reverse-engineer pg_constraint entries from the bare
trigger definitions that you'd get from a dump of an older database.
I'm not sure how bulletproof adddepend is, but it might be worth
looking at to see how it decides to group triggers into a constraint.
I believe also there is trigger-grouping logic in Red Hat's RH Admin
utility (see http://www.redhat.com/software/database/) you could try
that to see what it thinks you have.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2002-11-08 20:54:21 | Re: table growing |
Previous Message | Jean-Luc Lachance | 2002-11-08 19:51:39 | Re: Win2K Questions |