Re: change max_value in sequence

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Claus Guttesen" <kometen(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: change max_value in sequence
Date: 2008-09-05 15:39:10
Message-ID: 24842.1220629150@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Claus Guttesen" <kometen(at)gmail(dot)com> writes:
> I have a table with a serial field defined with an older version of
> postgresql (ver. 7). Back then max_value was 2147483647:
> How can I increase it? By updating the max_value-field?

I think you're looking for ALTER SEQUENCE.

Note that if the column it's feeding into is int4, you'd also need to
alter the column type ...

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Brad Nicholson 2008-09-05 15:46:28 Converting a Database from SQL_ASCII to UTF8
Previous Message Arctic Toucan 2008-09-05 15:28:29 How can I avoid Frozenxid wraparound on failover to a standby(PITR) database?