Re: SET NULL on NOT NULL field

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET NULL on NOT NULL field
Date: 2003-01-28 05:03:38
Message-ID: GNELIHDDFBOCMGBFGEFOEEDLCFAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > I just noticed you can do this:
> > create table blah (
> > a not null references test on delete set null
> > )
>
> > Should that be prevented?
>
> It already does. Or did you mean disallow the declaration? I can't see
> anything in SQL92 that recommends disallowing the declaration.

Hmmm, well you do get the 'failed to update null value in not null field'
when you actually delete something from the foreign table, but I guess
there's no reason to actually ban the declaration, as silly as it is...

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-28 05:22:12 Re: [PATCHES] IPv6 Support for INET/CIDR types. (fwd)
Previous Message Tom Lane 2003-01-28 04:49:27 Re: SET NULL on NOT NULL field