Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id D9FBC475D93 for ; Tue, 26 Mar 2002 15:11:58 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id D6BB0D608; Tue, 26 Mar 2002 12:11:56 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id B026A5BFD; Tue, 26 Mar 2002 12:11:56 -0800 (PST) Date: Tue, 26 Mar 2002 12:11:56 -0800 (PST) From: Stephan Szabo To: Peter Atkins Cc: Subject: Re: Changeing Sequence In-Reply-To: <02E689F991FFD311A75D009027B6A73E0886EAB1@corp_mail01.sf.nextcard.com> Message-ID: <20020326121027.U13230-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200203/346 X-Sequence-Number: 7221 On Tue, 26 Mar 2002, Peter Atkins wrote: > I have a table "mytable_id_seq" that looks like so. > > sequence_name | last_value | increment_by | max_value | > min_value | cache_value | log_cnt | is_cycled | is_called > ----------------------+------------+--------------+---------------------+--- > --------+-------------+---------+-----------+----------- > mytqble_id_seq | 4 | 1 | 9223372036854775807 | > 1 | 1 | 30 | f | t > > > I have data that must be entered into the table "mytable" with pre-defined > ids (i.e. 1,3,5,7,25). Is it possible to change the sequence to start at > "26" the last value of the previous data? select setval('mytqble_id_seq', 25); should make the next result 26 I believe.