Re: How foreign key info is stored

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Williams <ken(at)mathforum(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How foreign key info is stored
Date: 2003-04-17 19:41:33
Message-ID: 17662.1050608493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Williams <ken(at)mathforum(dot)org> writes:
> 1) In postgres 7.1.3, how can I access the foreign key relationships
> among tables?

The only way is to reverse-engineer it from the contents of pg_trigger.
7.3's contrib/adddepend will help you with this.

> 2) Is foreign key definition working properly via 'ALTER TABLE <table>
> ADD ...' in 7.3.2?

No, there's a bug there --- ALTER ADD COLUMN neglects to process any
foreign-key clauses you might have written. This is fixed for 7.3.3.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Williams, Travis L, NPONS 2003-04-17 19:42:24 Really simple TZ question
Previous Message Ken Williams 2003-04-17 19:28:00 How foreign key info is stored