Re: [HACKERS] RI and NULL's

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: [HACKERS] RI and NULL's
Дата
Msg-id 3.0.5.32.19990924092951.00b3a5d0@mail.rhyme.com.au
обсуждение исходный текст
Ответ на RI and NULL's  (wieck@debis.com (Jan Wieck))
Список pgsql-hackers
At 17:07 23/09/99 +0200, you wrote:
>
>    Assuming  NULL's  are  allowed in FK values (are they?)

I don't think they should be since two null fields are not equal, and the
reason for FK constraints to to require the foregn record exists. Also, I'm
pretty sure PK values should not be null.

>    like to know what the correct handling of NULL values is.  If
>    an  attribute  of the FK has the NULL value, must a PK with a
>    NULL  in  the  corresponding  attribute  exist  or  is   this
>    attribute  completely  left  out  of  the WHERE clause in the
>    check?

I don't think so. I believe PK values can't be null, so no FK field should
be null.

>    Other way round -  NULL  value  in  attribute  of  referenced
>    table.   What  to  delete  from  FK  in the case of ON DELETE
>    CASCADE?

This problem goes away.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: +61-03-5367 7422            |                 _________  \
Fax: +61-03-5367 7430            |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [PORTS] RedHat6.0 & Alpha
Следующее
От: "Sean Mullen"
Дата:
Сообщение: