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

From D'Arcy J.M. Cain
Subject Re: SET NULL / SET NOT NULL
Date
Msg-id 20020322125103.C883B1D72@druid.net
Whole thread Raw
In response to Re: SET NULL / SET NOT NULL  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On March 22, 2002 01:31 am, Peter Eisentraut wrote:
> Christopher Kings-Lynne writes:
> > Do we want the above syntax, or this syntax:
> >
> > ALTER TABLE blah ALTER COLUMN col SET NOT NULL;
> > ALTER TABLE blah ALTER COLUMN col SET NULL;
>
> My only objection to the second command is that it's plain wrong.  You
> don't set anything to NULL, so don't make the command look like it.

How about this?
 ALTER TABLE blah ALTER COLUMN col UNSET NOT NULL;

I would almost think that it should be NOTNULL anyway to make it clear that we
are setting (or unsetting) one thing and that it is not a weird way of saying
"...NOT SET NULL" or "NOT UNSET NULL" but I realize that it should also look
more like the NOT NULL clause we already have in the CREATE TABLE query.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-hackers by date:

Previous
From: "Luis Alberto Amigo Navarro"
Date:
Subject: Re: Problem compiling PostgreSQL 7.2 on IRIX 6.5.15f
Next
From: Hannu Krosing
Date:
Subject: Re: notification: pg_notify ?