X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 04724D1C983 for ; Fri, 8 Aug 2003 16:31:12 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 48742-04 for ; Fri, 8 Aug 2003 13:29:44 -0300 (ADT) Received: from irko.smoothcorp.com (unknown [208.49.241.41]) by svr1.postgresql.org (Postfix) with ESMTP id 19351D1C932 for ; Fri, 8 Aug 2003 13:31:01 -0300 (ADT) Received: from [10.0.1.63] (helo=jgardner.smoothcorp.com) by irko.smoothcorp.com with esmtp (Exim 4.12) id 19lA8p-0005UB-00; Fri, 08 Aug 2003 09:30:59 -0700 Received: from jgardner.smoothcorp.com (localhost.localdomain [127.0.0.1]) by jgardner.smoothcorp.com (8.12.8/8.12.8) with ESMTP id h78GUxsN027387; Fri, 8 Aug 2003 09:30:59 -0700 Received: from localhost (localhost [[UNIX: localhost]]) by jgardner.smoothcorp.com (8.12.8/8.12.8/Submit) id h78GUvWq027382; Fri, 8 Aug 2003 09:30:57 -0700 From: Jonathan Gardner To: Charles Hauser , PSQL_list Subject: Re: RI_ConstraintTrigger_11264756 Date: Fri, 8 Aug 2003 09:30:56 -0700 User-Agent: KMail/1.5 References: <1059679130.20194.6.camel@pandorina.biology.duke.edu> In-Reply-To: <1059679130.20194.6.camel@pandorina.biology.duke.edu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200308080930.57210.jgardner@jonathangardner.net> X-SA-Exim-Rcpt-To: chauser@duke.edu, pgsql-sql@postgresql.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/74 X-Sequence-Number: 14690 -----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 vario= us=20 fields mean. Normally, I see these triggers when I have declared a table to have a forei= gn=20 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: \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 drop= ped=20 most of the triggers and altered the table to have the foreign keys to reme= dy=20 this. - --=20 Jonathan Gardner Live Free, Use Linux! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/M9BAWgwF3QvpWNwRAmrKAKDrkW914nrOqiUm4D9JCYsmD982awCfYh3T pvdmcoJfo0f/bIFubyMUfbs=3D =3Dyzi0 -----END PGP SIGNATURE-----