Thread: Foreign Key Storage

Foreign Key Storage

From
Jessica Engblom
Date:
I need to get access to all of the foreign keys in a database, but I am
not sure where postgres stores them.  Does anyone know it they are
stored in a table or not, and if so which table?

Thanks.


Re: Foreign Key Storage

From
Stephan Szabo
Date:
You can get the information out of pg_trigger.  Each
references relationship will create three triggers in
pg_trigger.  It's not in a particularly friendly format
though.  There should be messages in the archives of
either -general or -hackers about the details.  (Or
if you can't find it, I can go through the entire thing
again).

Stephan Szabo
sszabo@bigpanda.com

On Mon, 21 Aug 2000, Jessica Engblom wrote:

> I need to get access to all of the foreign keys in a database, but I am
> not sure where postgres stores them.  Does anyone know it they are
> stored in a table or not, and if so which table?
>
> Thanks.
>