Re: SET NULL / SET NOT NULL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SET NULL / SET NOT NULL
Дата
Msg-id 2488.1016820729@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SET NULL / SET NOT NULL  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Ответы Re: SET NULL / SET NOT NULL  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: SET NULL / SET NOT NULL  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> ALTER TABLE blah ALTER [COLUMN] col [int4] [NOT NULL] [DEFAULT 32];
> ALTER TABLE blah ALTER [COLUMN] col [int8] [NULL] [DEFAULT 32];

This cannot work unless you are prepared to turn a lot more keywords
into reserved words.  In the CREATE syntax, the data type is not
optional.  In the above, there will be parse conflicts because the
system won't be able to decide whether a type name is present or not.

You could possibly make it work if you were willing to include the word
TYPE when trying to respecify column type:

ALTER TABLE blah ALTER [COLUMN] col [TYPE int4] [NOT NULL] [DEFAULT 32];

Also I agree with Fernando that trying to make the word COLUMN optional
is likely to lead to conflicts.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Igor Kovalenko
Дата:
Сообщение: Re: Fw: Fw: bad performance on irix
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Again, sorry, caching, (Tom What do you think: function