Changeing Sequence

From: Peter Atkins <Peter(dot)Atkins(at)nextcard(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Changeing Sequence
Date: 2002-03-26 19:55:50
Message-ID: 02E689F991FFD311A75D009027B6A73E0886EAB1@corp_mail01.sf.nextcard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

All,

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?

Please tell me YES! I get an error: "ERROR: You can't change sequence
relation t_staff_staff_id_seq"

Any Help would be great!

Thanks,
-pete

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Langille 2002-03-26 20:11:33 Re: Changeing Sequence
Previous Message John Oakes 2002-03-26 18:22:41 Possible to do this in one query?