Re: Convert serial column to regular integer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rodrigo De León <rdeleonp(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, "Collin Peters" <cadiolis(at)gmail(dot)com>
Subject: Re: Convert serial column to regular integer
Date: 2007-05-11 20:32:33
Message-ID: 2958.1178915553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"=?ISO-8859-1?Q?Rodrigo_De_Le=F3n?=" <rdeleonp(at)gmail(dot)com> writes:
> On 5/11/07, Collin Peters <cadiolis(at)gmail(dot)com> wrote:
>> Is there any way to remove the sequence fully?

> ALTER SEQUENCE dtab_i_seq OWNED BY NONE;

Pre-8.2 that command doesn't exist, but you can get the same effect if
you manually remove the pg_depend entry that links the sequence to the
column. Be sure you're removing the right entry ;-)

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Fernando Hevia 2007-05-11 21:14:55 check_constraint and Extract not working?
Previous Message Collin Peters 2007-05-11 20:18:02 Re: Convert serial column to regular integer