Re: ALTER TABLE TODO items

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: ALTER TABLE TODO items
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D0C4@m0114.s-mxs.net
обсуждение исходный текст
Ответ на ALTER TABLE TODO items  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
> FireBird: ALTER COLUMN <column> TYPE <type>
> DB2:    ALTER COLUMN <column> SET DATA TYPE <type>.
> Oracle:    MODIFY <column> <type>
> MSSQL:    ALTER COLUMN <column> <type> <constraints>
> MySQL:    Both Oracle and MSSQL
> Sap:    MODIFY <column> <type>
>
> Spec:    Nothing (obvious) on changing column types
>
> MODIFY is horrible. It seems to drop all constraints, defaults, etc that
> are not specified in the second definition. It is essentially a
> replacement of the column.

In Oracle MODIFY leaves omitted parts unchanged,
syntax is actually ALTER TABLE <table> MODIFY (<column> <type> <default> <constraint>)
I think the parentheses are optional if only one column is modified.

Andreas


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

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Constraint not shown on \d ?
Следующее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: Is there any method to keep table in memory at startup