Re: [HACKERS] RULES - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: [HACKERS] RULES
Date
Msg-id 20011121083853.V66185-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: [HACKERS] RULES  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List pgsql-sql
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 :)



pgsql-sql by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: [HACKERS] RULES
Next
From: Wei Weng
Date:
Subject: Generate GUID in postgresql