Re: [SQL] Setting Next Value in Sequence - Mailing list pgsql-sql

From Patrik Kudo
Subject Re: [SQL] Setting Next Value in Sequence
Date
Msg-id 36EE5AFB.E9F2771D@partitur.se
Whole thread Raw
In response to Setting Next Value in Sequence  ("Tim Perdue" <perdue@raccoon.com>)
List pgsql-sql
Hi,

You can't manipulate the sequence that way. You can do the following
though:

select setval('seq_mailid', 1375000);

Hope that helps.

Regards,
Patrik Kudo

Tim Perdue wrote:
>
> 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.
>
> Tim

pgsql-sql by date:

Previous
From: "Tim Perdue"
Date:
Subject: Re: [SQL] Setting Next Value in Sequence
Next
From: Herouth Maoz
Date:
Subject: Re: [SQL] Setting Next Value in Sequence