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