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: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Peter Eisentraut <peter_e(at)gmx(dot)net>, 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 19:20:09 |
Message-ID: | 200203221920.g2MJK9N26123@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> "Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> > BTW, is NULLABLE so ugly that no one wanted to comment on it?
>
> I kinda liked it, actually, if we were going to use the SET syntax.
> But people seem to be focused in on this "let's make it look like
> CREATE" notion. I'm willing to wait and see how far that can be made
> to work.
OK, how about:
SET CONSTRAINT NOT NULL
or
DROP CONSTRAINT NOT NULL
or simply:
SET/DROP NOT NULL
I think the problem with trying to get it look like CREATE TABLE is that
the plain NULL parameter to CREATE TABLE is meaningless and probably
should never be used. I remember at one point pg_dump output NULL in
the schema output and it confused many people. NOT NULL is the
constraint, and I think any solution to remove NOT NULL has to include
the NOT NULL keyword. I think this is also why SET NULL looks so bad.
"CREATE TABLE test (x int NULL)" doesn't look great either. :-) What
is that NULL doing there?
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2002-03-22 20:53:41 | Re: SET NULL / SET NOT NULL |
Previous Message | Bruce Momjian | 2002-03-22 19:12:40 | Re: Use of PG_BINARY_R and "r" |