From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "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>, "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SET NULL / SET NOT NULL |
Date: | 2002-03-25 07:38:35 |
Message-ID: | GNELIHDDFBOCMGBFGEFOEENLCBAA.chriskl@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> ALTER TABLE blah ALTER [COLUMN] col SET NOT NULL;
>
> and
>
> ALTER TABLE blah ALTER [COLUMN] col DROP NOT NULL;
>
> This is synchronous with the SET/DROP default stuff and is
> extensible in the
> future to fit in with column type changing.
>
> Of course, it can always be changed in the parser without
> affecting my code.
Also, in the future, once (if) the 'SET TYPE' column type changing function
has been implemented, we can create a meta-command to do it all in one
statement (for reliability and consistency for users). It could look like
this:
ALTER TABLE blah ALTER [COLUMN] col [SET TYPE type] [{SET | DROP} NOT NULL]
[{SET | DROP} DEFAULT [default]]
And a command like this should be able to just re-use already written code.
However, some interdependency checks might be more efficient if their done
before any changes are actually made! ie. Changing type to boolean and then
setting default to 'blah' in one statement, etc.
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-03-25 08:04:05 | Re: views on temp tables |
Previous Message | Ulrich Neumann | 2002-03-25 04:27:00 | Antw: Re: patch for include/utils/datetime.h to target NetWare |