Re: simulating partial fkeys.. - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: simulating partial fkeys..
Date
Msg-id 20030606122001.GA30097@wolff.to
Whole thread Raw
In response to simulating partial fkeys..  (<mallah@trade-india.com>)
Responses Elegant SQL solution:
List pgsql-sql
On Thu, Jun 05, 2003 at 20:25:32 +0530, mallah@trade-india.com wrote:
> 
> 
> hi ,
> 
> Is there any way to enforce fkeys only on subset of
> the table something on the lines of unique partial indexes
> 
> or any work around ? (on update or insert trigger is the only thing i can think of)

If the foreign column is null it isn't checked against the other table.
You can probably use this to do what you want.


pgsql-sql by date:

Previous
From:
Date:
Subject: simulating partial fkeys..
Next
From: Jan Wieck
Date:
Subject: Re: simulating partial fkeys..