Convert serial column to regular integer

From: "Collin Peters" <cadiolis(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Convert serial column to regular integer
Date: 2007-05-11 16:24:24
Message-ID: df01c91b0705110924k45362880rdcc01db1cae3024f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rodrigo De León 2007-05-11 16:36:25 Re: Convert serial column to regular integer
Previous Message John DeSoi 2007-05-11 15:12:56 Re: PL/PGSQL Record type question