Re: [HACKERS] FOREIGN KEY revisited
Vadim Mikheev <vadim@krs.ru>
From: Vadim Mikheev <vadim@krs.ru>
To: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Cc: "Matthew N. Dodd" <winter@jurai.net>, pgsql-hackers@postgreSQL.org
Date: 1998-08-28T07:31:55Z
Lists: 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