Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 22A5264FCDD for ; Fri, 5 Sep 2008 12:39:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 46879-03 for ; Fri, 5 Sep 2008 12:39:13 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4ABD464FCBA for ; Fri, 5 Sep 2008 12:39:13 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m85FdAii024843; Fri, 5 Sep 2008 11:39:10 -0400 (EDT) To: "Claus Guttesen" cc: pgsql-admin@postgresql.org Subject: Re: change max_value in sequence In-reply-to: References: Comments: In-reply-to "Claus Guttesen" message dated "Fri, 05 Sep 2008 14:58:21 +0200" Date: Fri, 05 Sep 2008 11:39:10 -0400 Message-ID: <24842.1220629150@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/44 X-Sequence-Number: 30137 "Claus Guttesen" 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