Re: alter table serial->int

From: "Erik Aronesty" <erik(at)q32(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: alter table serial->int
Date: 2007-11-08 16:17:44
Message-ID: ccd588d90711080817j482f1d39n80dee4334383ab51@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)q32(dot)com> wrote:
> n Nov 7, 2007 12:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Erik Aronesty" <erik(at)q32(dot)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.
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2007-11-08 19:57:21 Re: alter table serial->int
Previous Message Erik Aronesty 2007-11-08 16:14:22 Re: alter table serial->int