View Single Post

   
  #5 (permalink)  
Old 04-10-2008, 09:17 AM
Alvaro Herrera
 
Posts: n/a
Default Re: alter table serial->int

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.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply With Quote