Re: Query FKey Constraint Table and Column Names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Harding <iharding(at)tpchd(dot)org>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query FKey Constraint Table and Column Names
Date: 2003-10-03 16:14:56
Message-ID: 26348.1065197696@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ian Harding <iharding(at)tpchd(dot)org> writes:
> Is there already a view/function that will get me this info, and if not,
> am I barking up the right tree here?

I'd suggest using pg_get_constraintdef() to decipher the contents of the
pg_constraint row.

(In 7.3 I think this function only handles foreign-key constraints, but
that's what you wanted anyway...)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-10-03 16:16:07 Re: updating records
Previous Message Joshua D. Drake 2003-10-03 16:11:17 Re: administration with pgaccess