Re: simulating partial fkeys..

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: mallah(at)trade-india(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: simulating partial fkeys..
Date: 2003-06-06 12:20:01
Message-ID: 20030606122001.GA30097@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Jun 05, 2003 at 20:25:32 +0530,
mallah(at)trade-india(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-06-06 13:52:25 Re: Changing owner of function -- best method?
Previous Message Jan Wieck 2003-06-06 11:35:50 Re: simulating partial fkeys..