Re: How foreign key info is stored - Mailing list pgsql-general

From Tom Lane
Subject Re: How foreign key info is stored
Date
Msg-id 17662.1050608493@sss.pgh.pa.us
Whole thread Raw
In response to How foreign key info is stored  (Ken Williams <ken@mathforum.org>)
Responses Re: How foreign key info is stored  (Ken Williams <ken@mathforum.org>)
List pgsql-general
Ken Williams <ken@mathforum.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


pgsql-general by date:

Previous
From: Ken Williams
Date:
Subject: How foreign key info is stored
Next
From: "Williams, Travis L, NPONS"
Date:
Subject: Really simple TZ question