Re: How foreign key info is stored

From: Ken Williams <ken(at)mathforum(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How foreign key info is stored
Date: 2003-04-17 19:58:47
Message-ID: 00336FBC-710F-11D7-A353-003065F6D85A@mathforum.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thursday, April 17, 2003, at 02:41 PM, Tom Lane wrote:

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

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew J. Kopciuch 2003-04-17 20:41:37 Packages question
Previous Message Tom Lane 2003-04-17 19:52:06 Re: [HACKERS] Are we losing momentum?