Re: SET NULL / SET NOT NULL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SET NULL / SET NOT NULL
Date
Msg-id 25894.1016903861@sss.pgh.pa.us
Whole thread Raw
In response to Re: SET NULL / SET NOT NULL  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: SET NULL / SET NOT NULL
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> I have throught of at least two problems with changing nullability.  The
> first is primary keys.  I have to prevent people setting a column involved
> in a PK to null, right?

Probably so.

> The second is DOMAINs - what if they change a NOT NULL domain in a colun
> to NULL?  Shoudl I just outright prevent people from altering domain-based
> columns nullability>

I don't think you need worry about this.  The prototype DOMAIN
implementation is broken anyway --- it should not be transposing
domain constraints into column constraints, but should keep 'em
separate.  The column-level attnotnull setting should be independent
of whether the domain enforces not-nullness or not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Copeland
Date:
Subject: Re: notification: pg_notify ?
Next
From: Tom Lane
Date:
Subject: Re: notification: pg_notify ?