From: Bruno Wolff III <bruno@wolff.to>
To: mallah@trade-india.com
Cc: pgsql-sql@postgresql.org
Subject: Re: simulating partial fkeys..
Date: Fri, 6 Jun 2003 07:20:01 -0500
Message-ID: <20030606122001.GA30097@wolff.to> (raw)
In-Reply-To: <1153.219.65.253.151.1054824932.squirrel@mail.trade-india.com>
References: <1153.219.65.253.151.1054824932.squirrel@mail.trade-india.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, mallah@trade-india.com
Subject: Re: simulating partial fkeys..
In-Reply-To: <20030606122001.GA30097@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox