Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3D9DB9FBDA5 for ; Fri, 11 May 2007 13:24:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39489-09 for ; Fri, 11 May 2007 13:24:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by postgresql.org (Postfix) with ESMTP id 9EF1B9FBD23 for ; Fri, 11 May 2007 13:24:25 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id s1so1085971nze for ; Fri, 11 May 2007 09:24:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bbS0wnqhmgsyarkuMj0bEc0AxLranVsFBWZ3YIgMYrZwgg+NcCrSZDcxDaIV8jBT1LG46stfWiV7v/oWQymWJRRpVktnh6vnk6twy4pgeDVyJn1IHghcjU8PHjR24yFhRO7BQBobXAC7h2raI1K9AjJGZXCJNrYKsys/TjdtAqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=rLdK6y7kB5UmXyWL1n1/tZm7dSrvi27FqIFX20ILMmZYrjlDevnl7SH1lEK07wU4OYZiZ+RR92xEk8Yy8TifD792VPeGmjIhj9JuXso7UlODbN+n0IAmiU3IUcbAlHRzaS5i+Xz1RasXzQ7Eb36qbx7UDectrw50vSglSve/ZUI= Received: by 10.114.52.1 with SMTP id z1mr999665waz.1178900664153; Fri, 11 May 2007 09:24:24 -0700 (PDT) Received: by 10.114.37.3 with HTTP; Fri, 11 May 2007 09:24:24 -0700 (PDT) Message-ID: Date: Fri, 11 May 2007 09:24:24 -0700 From: "Collin Peters" To: pgsql-sql@postgresql.org Subject: Convert serial column to regular integer MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/86 X-Sequence-Number: 28366 I have a need to convert an incorrectly typed serial column to a regular integer column. Basically this just involves removing the sequence. I am able to successfully remove the default value (DROP DEFAULT) (which seems to use nextval) and now pgadmin does show the column as an integer, but I cannot remove the sequence as it says it is still in use. If I look at the column in pgadmin the sequence field is still filled in with the sequence but it is grayed out. Is there any way to remove the sequence fully? Regards, Collin