Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group