Re: Sequenties in pgSQL 7.3.x

From: Przemysław Słupkowski <przemyslaw(dot)slupkowski(at)euro(dot)coig(dot)pl>
To: "Lista dyskusyjna pgsql-sql" <pgsql-sql(at)postgresql(dot)org>, "Richard Huxton" <dev(at)archonet(dot)com>
Subject: Re: Sequenties in pgSQL 7.3.x
Date: 2003-09-25 08:16:57
Message-ID: 000501c3833d$63383ea0$930f10ac@win.coig.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

HI
Thanks for help I'm found this solution and this works, but I'm use
something like that
PERFORM setval(seq_name, value);
It looks better but thanks a lot

----- Original Message -----
From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Przemysław Słupkowski" <przemyslaw(dot)slupkowski(at)euro(dot)coig(dot)pl>; "Lista
dyskusyjna pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Sent: Thursday, September 25, 2003 9:55 AM
Subject: Re: [SQL] Sequenties in pgSQL 7.3.x

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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message vijaykumar M 2003-09-25 08:20:57
Previous Message Richard Huxton 2003-09-25 07:55:54 Re: Sequenties in pgSQL 7.3.x