Re: alter table serial->int - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: alter table serial->int
Date
Msg-id 20071108195721.GU2938@alvh.no-ip.org
Whole thread Raw
In response to Re: alter table serial->int  ("Erik Aronesty" <erik@q32.com>)
Responses Re: alter table serial->int
List 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 by date:

Previous
From: "Erik Aronesty"
Date:
Subject: Re: alter table serial->int
Next
From: "Igor Neyman"
Date:
Subject: Re: alter table serial->int