Re: SET NULL / SET NOT NULL
От | Zeugswetter Andreas SB SD |
---|---|
Тема | Re: SET NULL / SET NOT NULL |
Дата | |
Msg-id | 46C15C39FEB2C44BA555E356FBCD6FA4961D93@m0114.s-mxs.net обсуждение исходный текст |
Ответ на | SET NULL / SET NOT NULL ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
Ответы |
Re: SET NULL / SET NOT NULL
|
Список | pgsql-hackers |
> > 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. Imho it would be nice if the command would look exactly like a create table. It is simply convenient to use cut and paste :-) And I haven't seen a keyword yet, that would make it more descriptive, certainly not SET. ALTER TABLE blah ALTER [COLUMN] col [int4] [NOT NULL] [DEFAULT 32]; ALTER TABLE blah ALTER [COLUMN] col [int8] [NULL] [DEFAULT 32]; maybe even [DEFAULT NULL] to drop the default :-) Andreas
В списке pgsql-hackers по дате отправления: