RI and NULL's

From: wieck(at)debis(dot)com (Jan Wieck)
To: pgsql-hackers(at)postgreSQL(dot)org (PostgreSQL HACKERS)
Subject: RI and NULL's
Date: 1999-09-23 15:07:13
Message-ID: m11UASn-0003kLC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

One more question:

I'm planning to create generic trigger procs for PK/FK stuff.
So that it's simply insert/delete the appropriate pg_trigger
entries during CREATE/ALTER table.

Assuming NULL's are allowed in FK values (are they?), I'd
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?

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

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#========================================= wieck(at)debis(dot)com (Jan Wieck) #

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-09-23 15:13:19 Re: [HACKERS] Problem with new function
Previous Message Bruce Momjian 1999-09-23 14:59:12 Re: [HACKERS] Compile timing