X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1AAB5D1B57F for ; Thu, 25 Sep 2003 07:56:29 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 76327-02 for ; Thu, 25 Sep 2003 04:55:58 -0300 (ADT) Received: from anchor-post-37.mail.demon.net (anchor-post-37.mail.demon.net [194.217.242.87]) by svr1.postgresql.org (Postfix) with ESMTP id 116B8D1B500 for ; Thu, 25 Sep 2003 04:55:57 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1A2Qyk-000BPS-0b; Thu, 25 Sep 2003 08:55:58 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 7BC6F1596E; Thu, 25 Sep 2003 08:55:57 +0100 (BST) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id D131C1592D; Thu, 25 Sep 2003 08:55:55 +0100 (BST) From: Richard Huxton To: =?iso-8859-2?q?Przemys=B3aw=20S=B3upkowski?= , "Lista dyskusyjna pgsql-sql" Subject: Re: Sequenties in pgSQL 7.3.x Date: Thu, 25 Sep 2003 08:55:54 +0100 User-Agent: KMail/1.5 References: <005601c3832f$61fbcf60$930f10ac@win.coig.com> In-Reply-To: <005601c3832f$61fbcf60$930f10ac@win.coig.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200309250855.54588.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/300 X-Sequence-Number: 15278 On Thursday 25 September 2003 07:36, Przemys=B3aw S=B3upkowski 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 valu= e. > 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 setva= l()=20 function instead. SELECT setval('my_seq', 1234); --=20 Richard Huxton Archonet Ltd