Re: [HACKERS] FOREIGN KEY revisited - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] FOREIGN KEY revisited
Date
Msg-id 35E65CEB.EDB995F4@krs.ru
Whole thread Raw
In response to FOREIGN KEY revisited  ("Matthew N. Dodd" <winter@jurai.net>)
List pgsql-hackers
Thomas G. Lockhart wrote:
>
> Back to your question: Postgres probably does not remove trigger
> functions if a table is destroyed, but that isn't a problem if the
> trigger function is generic code which will be reused anyway.

Both functions in spi/refint.c are generic ones. They should be
part of core system, not of contrib, to be used for FOREIGN KEY
in CREATE TABLE...
No problems with using them.

>
> Vadim has been thinking about how to do foreign keys, but I can't
> remember if it was via triggers or some other means.
                     ^^^^^^^^^^^^
No. Via indices.

Vadim

pgsql-hackers by date:

Previous
From: "Matthew N. Dodd"
Date:
Subject: Re: [HACKERS] FOREIGN KEY revisited
Next
From: Tom Ivar Helbekkmo
Date:
Subject: Re: [HACKERS] vacuum problem