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

From Erik Aronesty
Subject Re: alter table serial->int
Date
Msg-id ccd588d90711080817j482f1d39n80dee4334383ab51@mail.gmail.com
Whole thread Raw
In response to alter table serial->int  ("Erik Aronesty" <erik@q32.com>)
Responses Re: alter table serial->int  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-admin
-- 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


On Nov 8, 2007 11:13 AM, Erik Aronesty <erik@q32.com> wrote:
> n Nov 7, 2007 12:11 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > "Erik Aronesty" <erik@q32.com> writes:
> > > for some odd reason when i try to change a table fromserial to just
> > > plain "int with a default" postgres seems to ignore me.
> >
> > What PG version?
>
> (PostgreSQL) 8.1.10
>
> > The fact that you even tried that suggests that you don't understand
> > very well what "serial" is.  See the manual ...
>
> I tried to change the data type first.  Which implies I know what it means.
>

pgsql-admin by date:

Previous
From: "Abraham, Danny"
Date:
Subject: initdb fails on Windows - some shared memory problem
Next
From: "Erik Aronesty"
Date:
Subject: Re: alter table serial->int