pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Aronesty <erik@q32.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: alter table serial->int
Date: Wed, 07 Nov 2007 00:11:10 -0500
Message-ID: <7625.1194412270@sss.pgh.pa.us> (raw)
In-Reply-To: <ccd588d90711061359m57d95921mc28b74dec9f35f54@mail.gmail.com>
References: <ccd588d90711061359m57d95921mc28b74dec9f35f54@mail.gmail.com>

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

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



view thread (8+ messages)  latest in thread

Message-ID: <7625.1194412270@sss.pgh.pa.us>
Permalink:  ../7625.1194412270@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7625.1194412270@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, erik@q32.com
  Subject: Re: alter table serial->int
  In-Reply-To: <7625.1194412270@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox