On Sat, 30 Dec 2000, GH wrote:
> > Er, it smells like that only shows triggers, rather than foreign key
> > constraints. Correct?
>
> Ah hell, foreign keys constraints are triggers, right?
To quote Mike's email:
Date: Mon, 4 Dec 2000 23:28:32 -0500 (EST)
From: Michael Fork <mfork@toledolink.com>
To: pgsql-hackers@postgresql.org
Subject: RE: [HACKERS] SQL to retrieve FK's, Update/Delete action,
etc. (fwd)
There ya go, I figured it out :) Given the name a table, this query will
return all foreign keys in that table, the table the primary key is in,
the name of the primary key, if the are deferrable, if the are initially
deffered, and the action to be performed (RESTRICT, SET NULL, etc.). To
get the foreign keys and primary keys and tables, you must parse the
null-terminated pg.tgargs.
Good night :)
--
Dominic J. Eidson
"Baruk Khazad! Khazad ai-menu!" - Gimli
-------------------------------------------------------------------------------
http://www.the-infinite.org/ http://www.the-infinite.org/~dominic/