Received: from megazone.bigpanda.com ([63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fALGh1m46297 for ; Wed, 21 Nov 2001 11:43:01 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 3D44FD5E9; Wed, 21 Nov 2001 08:43:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 32F745BE7; Wed, 21 Nov 2001 08:43:06 -0800 (PST) Date: Wed, 21 Nov 2001 08:43:06 -0800 (PST) From: Stephan Szabo To: "Ross J. Reedstrom" Cc: Patrick Welche , Subject: Re: [HACKERS] RULES In-Reply-To: <20011121095731.C22603@rice.edu> Message-ID: <20011121083853.V66185-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200111/304 X-Sequence-Number: 5686 On Wed, 21 Nov 2001, Ross J. Reedstrom wrote: Want to pop in here. > On Wed, Nov 21, 2001 at 12:58:37PM +0000, Patrick Welche wrote: > > > > create table a ( > > id integer primary key > > ); > > > > create table b ( > > a_id integer references a(id) match full > > ); > > > > select * from pg_trigger where tgname ~* '^RI_'; > > > > Gives me 3 rows. They all contain the same tgargs. Is it therefore > > sufficient to select distinct tgnargs,tgargs if I just want to be able to > > recreate the "references... match full" part of the create table statement? Not quite, you'll lose the referential action information if you don't include info out of tgfoids on the pk table's triggers and you'll lose the deferment info if you don't pay attention to tgdeferrable and tginitdeferred. In your case you're not using those, but... There have been messages in the past about how to get the reference information. You should be able to find a function or something in the archives :)