From: | Nis Jørgensen <nis(at)superlativ(dot)dk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Cc: | Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Quick question re foreign keys. |
Date: | 2007-10-24 07:43:10 |
Message-ID: | 471EF78E.8050503@superlativ.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
D'Arcy J.M. Cain skrev:
> On Wed, 24 Oct 2007 11:00:47 +0800
> Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au> wrote:
>> It's marked not null as a result of being part of the primary key for
>> that table which I can't really get around.
>>
>> I can get away with not having the foreign key though, so I'll have to
>> go down that path.
>
> It can't be the primary key and have NULLs. It sounds to me like you
> have a design problem somewhere.
Well, I have a couple of times had the "need" to have a primary
key/uniqueness constraint with one column nullable (indicating "Not
Applicable"). The "problem" is that we have only one NULL, which for
comparison purposes is interpreted as "Not Known".
Nis
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Fuchs | 2007-10-24 09:19:26 | Re: request for help with COPY syntax |
Previous Message | Paul Lambert | 2007-10-24 07:10:59 | Re: request for help with COPY syntax |