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

From Christopher Kings-Lynne
Subject Re: SET NULL / SET NOT NULL
Date
Msg-id 20020323173434.Y7977-100000@houston.familyhealth.com.au
Whole thread Raw
In response to Re: SET NULL / SET NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SET NULL / SET NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> You could possibly make it work if you were willing to include the word
> TYPE when trying to respecify column type:
>
> ALTER TABLE blah ALTER [COLUMN] col [TYPE int4] [NOT NULL] [DEFAULT 32];
>
> Also I agree with Fernando that trying to make the word COLUMN optional
> is likely to lead to conflicts.

But all the other ALTER TABLE/Alter Column commands have it optional...

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?

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>

Chris



pgsql-hackers by date:

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