Re: alter table serial->int

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Erik Aronesty" <erik(at)q32(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: alter table serial->int
Date: 2007-11-07 05:11:10
Message-ID: 7625.1194412270@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"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?

I'd expect this to work somewhat sanely in 8.2, but in earlier versions
fooling with the default expression for a serial column is not well
supported.

> alter table custom alter id type int;

The fact that you even tried that suggests that you don't understand
very well what "serial" is. See the manual ...

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message rloefgren 2007-11-07 14:01:44 Re: Source of pgpool2 manual
Previous Message j a 2007-11-07 00:19:16 Re: Vacuum Doesn't Recover Disk Space