From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Peter Atkins <Peter.Atkins@nextcard.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Changeing Sequence
Date: Tue, 26 Mar 2002 12:11:56 -0800 (PST)
Message-ID: <20020326121027.U13230-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <02E689F991FFD311A75D009027B6A73E0886EAB1@corp_mail01.sf.nextcard.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, Peter.Atkins@nextcard.com
Subject: Re: Changeing Sequence
In-Reply-To: <20020326121027.U13230-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox