Re: SET NULL / SET NOT NULL

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET NULL / SET NOT NULL
Date: 2002-03-23 09:36:29
Message-ID: 20020323173434.Y7977-100000@houston.familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Copeland 2002-03-23 16:51:36 Re: notification: pg_notify ?
Previous Message Tom Lane 2002-03-23 05:13:21 Re: notification: pg_notify ?