Re: SET NULL / SET NOT NULL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET NULL / SET NOT NULL
Date: 2002-03-22 06:27:23
Message-ID: 200203220627.g2M6RN314503@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > Say in the future we want to support changing column type as well. How
> > would we work that in?
>
> > ALTER TABLE blah ALTER COLUMN col SET int4; ??????
>
> Seems one keyword shy of a load; I'd prefer
>
> ALTER TABLE blah ALTER COLUMN col SET TYPE int4;
>
> Otherwise, every keyword that might appear after SET will have to be
> fully reserved (else it couldn't be distinguished from a type name).
>
> I like the "SET NULL"/"SET NOT NULL" variant better than SET/DROP, even
> though "SET NULL" is perhaps open to misinterpretation. "DROP NOT NULL"
> seems just as confusing for anyone who's not read the documentation :-(

Yes, DROP NOT NULL does have a weird twist to it. However, does SET
NULL sound to much like you are setting all the values to NULL?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-03-22 06:27:52 Re: Problem with reloading groups in pg_hba.conf
Previous Message Christopher Kings-Lynne 2002-03-22 06:15:35 Re: SET NULL / SET NOT NULL