Skip site navigation (1) Skip section navigation (2)

Re: foreign key's in system tables

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tjibbe Rijpma <tjibbe(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: foreign key's in system tables
Date: 2006-01-05 00:31:53
Message-ID: 20060105003153.GA27861@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, Jan 04, 2006 at 11:57:45PM -0800, Tjibbe Rijpma wrote:
> From a table I want to know all the foreign key en their references.
> This goes well, but if there is more than one column in a FOREIGN KEY
> is goes wrong. 

Are you familiar with the pg_get_constraintdef() function?  That's
what psql's "\d tablename" command uses.

http://www.postgresql.org/docs/8.1/interactive/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE

-- 
Michael Fuhr

In response to

pgsql-novice by date

Next:From: Justin W. ReagorDate: 2006-01-05 00:51:05
Subject: pg_xlog directory
Previous:From: operationsengineer1Date: 2006-01-04 23:23:15
Subject: Re: Problem UPDATE Statement

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group