Re: Quick question re foreign keys.

Поиск
Список
Период
Сортировка
От Paul Lambert
Тема Re: Quick question re foreign keys.
Дата
Msg-id 471EB55F.5050600@autoledgers.com.au
обсуждение исходный текст
Ответ на Re: Quick question re foreign keys.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Quick question re foreign keys.  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Re: Quick question re foreign keys.  (Paul Lambert <paul.lambert@autoledgers.com.au>)
Список pgsql-sql
Tom Lane wrote:
> 
> If I'm understanding you correctly, the problem is not the foreign key,
> it's that you marked the column NOT NULL.  A foreign key constraint by
> itself will allow a NULL in the referencing column to pass.  You choose
> whether you want to allow that or not by separately applying a NOT NULL
> constraint or not.
> 
>             regards, tom lane

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.

Cheers,
P.

-- 
Paul Lambert
Database Administrator
AutoLedgers



В списке pgsql-sql по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: request for help with COPY syntax
Следующее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: Re: Quick question re foreign keys.