Re: [HACKERS] RULES

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: [HACKERS] RULES
Date: 2001-11-21 16:43:06
Message-ID: 20011121083853.V66185-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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 :)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-11-21 16:47:40 Re: beta3
Previous Message Ross J. Reedstrom 2001-11-21 16:14:39 Re: beta3

Browse pgsql-sql by date

  From Date Subject
Next Message Wei Weng 2001-11-21 23:46:53 Generate GUID in postgresql
Previous Message Ross J. Reedstrom 2001-11-21 15:57:31 Re: [HACKERS] RULES