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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

  From Date Subject
Next Message Justin W. Reagor 2006-01-05 00:51:05 pg_xlog directory
Previous Message operationsengineer1 2006-01-04 23:23:15 Re: Problem UPDATE Statement