Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B01C19F9296 for ; Wed, 7 Nov 2007 01:24:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 66745-03 for ; Wed, 7 Nov 2007 01:23:53 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BCF5B9F931E for ; Wed, 7 Nov 2007 01:11:11 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA75BAj1007626; Wed, 7 Nov 2007 00:11:10 -0500 (EST) To: "Erik Aronesty" cc: pgsql-admin@postgresql.org Subject: Re: alter table serial->int In-reply-to: References: Comments: In-reply-to "Erik Aronesty" message dated "Tue, 06 Nov 2007 16:59:44 -0500" Date: Wed, 07 Nov 2007 00:11:10 -0500 Message-ID: <7625.1194412270@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/61 X-Sequence-Number: 27304 "Erik Aronesty" 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