From: | Jonathan Gardner <jgardner(at)jonathangardner(dot)net> |
---|---|
To: | Charles Hauser <chauser(at)duke(dot)edu>, PSQL_list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: RI_ConstraintTrigger_11264756 |
Date: | 2003-08-08 16:30:56 |
Message-ID: | 200308080930.57210.jgardner@jonathangardner.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 31 July 2003 12:18, Charles Hauser wrote:
> All,
>
> I have inherited a table (below) with a RI trigger.
> I believe this table was created where both clone_id & blastx_id are FKs
> w/ stipulation 'ON DELETE CASCADE'.
>
> My question is, is this specified in the trigger:
> RI_ConstraintTrigger_11264756?
>
> If so how would I learn the content of the trigger knowing just the
> trigger id (11264756)?
>
> I have not seen a 'decoding' of triggers using pgsql.
>
Look at the pg_trigger table. There is some documentation on what the various
fields mean.
Normally, I see these triggers when I have declared a table to have a foreign
key, or I created a table that has a foreign key that references this table.
I can usually decode who is referencing what from the tgargs column.
Example:
<unnamed>\000order_materials\000order_shipping\000UNSPECIFIED\000order_ship_id\000order_ship_id\000
Translates to:
order_materials.order_ship_id references order_shipping.order_ship_id
I have found a ton of these as I have upgraded from 7.2 to 7.3. I have dropped
most of the triggers and altered the table to have the foreign keys to remedy
this.
- --
Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/M9BAWgwF3QvpWNwRAmrKAKDrkW914nrOqiUm4D9JCYsmD982awCfYh3T
pvdmcoJfo0f/bIFubyMUfbs=
=yzi0
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-08-08 16:37:33 | Re: Abort Transaction DP PK (again) |
Previous Message | Jonathan Gardner | 2003-08-08 16:24:48 | Re: Analyze makes queries slow... |