Re: how to find foreign key details (column, that is)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to find foreign key details (column, that is)
Date: 2008-12-14 19:37:51
Message-ID: 1978.1229283471@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> writes:
> I cannot, however, for the life of it find out how to learn
> the *column* the foreign key is on.

pg_constraint.conkey has the referencing columns' numbers.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2008-12-14 19:57:39 Re: how to find foreign key details (column, that is)
Previous Message Ivan Sergio Borgonovo 2008-12-14 19:16:35 from 2 keys to serial