Re: Sequenties in pgSQL 7.3.x - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Sequenties in pgSQL 7.3.x
Date
Msg-id 200309250855.54588.dev@archonet.com
Whole thread Raw
In response to Sequenties in pgSQL 7.3.x  (Przemysław Słupkowski<przemyslaw.slupkowski@euro.coig.pl>)
List pgsql-sql
On Thursday 25 September 2003 07:36, Przemysław Słupkowski wrote:
> Hi
> I am using postgresql 7.3.x. I am upgrating a database PostgreSQL.
> The main problem is how to change field last value in sequencde which
> exists in database. I created script to read this field and then I'm drop
> the table, do modification and i'm must change this value to another value.
> But DBMS returns me message like that
> ERROR:  You can't change sequence relation seq_id_seq
> How to do this

Are you using and UPDATE to set last_value? If so, you should use the setval()
function instead.

SELECT setval('my_seq', 1234);

--  Richard Huxton Archonet Ltd


pgsql-sql by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: Sequenties in pgSQL 7.3.x
Next
From: Przemysław Słupkowski
Date:
Subject: Re: Sequenties in pgSQL 7.3.x