Tom Lane wrote:
> "Ross J. Reedstrom" <reedstrm@rice.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@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026