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

From Ken Williams
Subject Re: How foreign key info is stored
Date
Msg-id 00336FBC-710F-11D7-A353-003065F6D85A@mathforum.org
Whole thread Raw
In response to Re: How foreign key info is stored  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How foreign key info is stored  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thursday, April 17, 2003, at 02:41  PM, Tom Lane wrote:

> 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.

Okay, thanks.  Is there any documentation for the pg_trigger table?  It
seems to be missing from


http://www.postgresql.org/docs/
view.php?version=7.1&idoc=1&file=catalogs.html

If there are no docs, I can probably reverse-engineer the
reverse-engineering from findForeignKeys() in the adddepend script.


>> 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.

Thanks.

  -Ken


pgsql-general by date:

Previous
From: "Williams, Travis L, NPONS"
Date:
Subject: Really simple TZ question
Next
From: "Andrew J. Kopciuch"
Date:
Subject: Packages question