pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Przemysław Słupkowski <przemyslaw.slupkowski@euro.coig.pl>
To: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
To: Richard Huxton <dev@archonet.com>
Subject: Re: Sequenties in pgSQL 7.3.x
Date: Thu, 25 Sep 2003 10:16:57 +0200
Message-ID: <000501c3833d$63383ea0$930f10ac@win.coig.com> (raw)
References: <005601c3832f$61fbcf60$930f10ac@win.coig.com>
	<200309250855.54588.dev@archonet.com>

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@archonet.com>
To: "Przemysław Słupkowski" <przemyslaw.slupkowski@euro.coig.pl>; "Lista
dyskusyjna pgsql-sql" <pgsql-sql@postgresql.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




view thread (5+ messages)

Message-ID: <000501c3833d$63383ea0$930f10ac@win.coig.com>
Permalink:  ../000501c3833d$63383ea0$930f10ac@win.coig.com/
Also on:    postgresql.org/message-id/000501c3833d$63383ea0$930f10ac@win.coig.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: przemyslaw.slupkowski@euro.coig.pl, dev@archonet.com
  Subject: Re: Sequenties in pgSQL 7.3.x
  In-Reply-To: <000501c3833d$63383ea0$930f10ac@win.coig.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox