Re: Sequence (related) Problem - Mailing list pgsql-general

From Neil Conway
Subject Re: Sequence (related) Problem
Date
Msg-id 1038435071.3550.37.camel@tokyo
Whole thread Raw
In response to Sequence (related) Problem  ("Ron St.Pierre" <rstpierre@syscor.com>)
List pgsql-general
On Wed, 2002-11-27 at 16:38, Ron St.Pierre wrote:
> To set the start value of the new sequence I am trying:
>
>      CREATE SEQUENCE 'tblnew_id_seq' start nextval('tblold_id_deq')
> increment 1 maxvalue 2147483647 minvalue 1  cache 1 ;

Execute the CREATE SEQUENCE with the default start value, and then set
it to whatever you like using:

SELECT setval('my_seq', nextval('abc') + ...);

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: table name size
Next
From: Jon Swinth
Date:
Subject: Re: Two features left