From the reference manual:
[ CONSTRAINT constraint_name ] REFERENCES reftable [ ( refcolumn ) ]
[ MATCH matchtype ]
[ ON DELETE action ]
[ ON UPDATE action ]
[ [ NOT ] DEFERRABLE ]
[ INITIALLY checktime ]
The refcolumn doesn't need to be the primary key. Do you just want to
have referential integrity between your two (or more) unique fields (the
ones you originally used as the primary key) and some other table(s)?
On Mon, 30 Jul 2001, DI Hasenöhrl wrote:
> I use postgresql 7.0.2 with ODBC 7.1.0003 as backend and MsAccess97 as frontend.
> In order to be able to work with float and numeric values I must enable Row Versioning, but this only works with single field primary keys.
> In my database design I use multiple field primary keys and also multiple field foreign keys.
> For enabling Row Versioning I changed the multiple field Primary keys to a *dummy* single field primary key and created unique indexes but how can I realize referential integrity on these unique indexes???????????
> I can imagine to handle referential integrity with triggers. Is there another, better solution for this problem?
> Please, let me know where I can find some hints :-)
> Kind regards
> E-Mail: i(dot)hasenoehrl(at)aon(dot)at
In response to
pgsql-odbc by date
|Next:||From: Cedar Cox||Date: 2001-07-30 15:59:49|
|Subject: Re: Problem:Row Versioning with multiple field Primary Key|
|Previous:||From: DI Hasenöhrl||Date: 2001-07-30 11:23:35|
|Subject: Problem:Row Versioning with multiple field Primary Key|