Re: alter table serial->int

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: alter table serial->int
Дата
Msg-id 20071108195721.GU2938@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: alter table serial->int  ("Erik Aronesty" <erik@q32.com>)
Ответы Re: alter table serial->int
Список pgsql-admin
Erik Aronesty wrote:
> -- Simpler example for you
>
> CREATE TABLE x (
>    id serial NOT NULL
> );
>
> ALTER TABLE x alter id type int;
>
> -- Under 8.1.10, a call to pg_dump will reveal the change has not happened

Do an ALTER TABLE DROP DEFAULT instead.  SERIAL is a macro for "int with
a default".

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: "Erik Aronesty"
Дата:
Сообщение: Re: alter table serial->int
Следующее
От: "Igor Neyman"
Дата:
Сообщение: Re: alter table serial->int