Quick question re foreign keys. - Mailing list pgsql-sql

From Paul Lambert
Subject Quick question re foreign keys.
Date
Msg-id 471EA7D5.9040403@autoledgers.com.au
Whole thread Raw
Responses Re: Quick question re foreign keys.
Re: Quick question re foreign keys.
List pgsql-sql
I have a table where one column references by foreign key a column from 
another table. However, the column in this first table does not always 
contain data which results in a not-null constraint violation when I 
attempt an insert.

My question therefore is, is it possible to create a foreign key that is 
conditional, i.e. only enforce the foreign key where the value in that 
table is not null.

-- 
Paul Lambert
Database Administrator
AutoLedgers



pgsql-sql by date:

Previous
From: "Fernando Hevia"
Date:
Subject: Re: request for help with COPY syntax
Next
From: "Phillip Smith"
Date:
Subject: Re: Quick question re foreign keys.