Re: [SQL] Setting Next Value in Sequence

From: "Tim Perdue" <perdue(at)raccoon(dot)com>
To: "Remigiusz Sokolowski" <rems(at)gdansk(dot)sprint(dot)pl>, <pgsql-sql(at)hub(dot)org>
Subject: Re: [SQL] Setting Next Value in Sequence
Date: 1999-03-16 13:06:06
Message-ID: 00ad01be6fad$c1097380$0b8c5aa5@timnt.weather.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

May table is defined to use the sequence, and the table is not trivial to
export and rebuild with the new sequence.

There's got to be some way around this. I'm probably going to have to create
a bogus table using that sequence, then insert 150,000 bogus records to
increment the sequence. Then drop the table.

Tim

-----Original Message-----
From: Remigiusz Sokolowski <rems(at)gdansk(dot)sprint(dot)pl>
To: Tim Perdue <perdue(at)raccoon(dot)com>
Cc: pgsql-sql(at)hub(dot)org <pgsql-sql(at)hub(dot)org>
Date: Tuesday, March 16, 1999 6:57 AM
Subject: Re: [SQL] Setting Next Value in Sequence

>> Maybe it's due to sleep deprivation, but this is not working. I'm trying
to
>> update a seqence to a higher number, and it won't let me.
>>
>> db_domain=> update seq_mailid set last_value=1375000;
>> ERROR: You can't change sequence relation seq_mailid
>>
>> My sense of humor has totally faded over the last two days, and I would
>> appreciate sone input.
>
>So, may be just drop sequence and create new one with start 1375000.
> Rem
>
>-------------------------------------------------------------------*-------
-----
>Remigiusz Sokolowski e-mail: rems(at)gdansk(dot)sprint(dot)pl * *
>-----------------------------------------------------------------*****-----
-----

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Patrik Kudo 1999-03-16 13:22:03 Re: [SQL] Setting Next Value in Sequence
Previous Message Herouth Maoz 1999-03-16 13:03:44 Re: [SQL] Setting Next Value in Sequence