Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 36DC5475FB0 for ; Wed, 4 Dec 2002 10:50:57 -0500 (EST) Received: from www.pspl.co.in (www.pspl.co.in [202.54.11.65]) by postgresql.org (Postfix) with ESMTP id 46C37475EE1 for ; Wed, 4 Dec 2002 10:50:53 -0500 (EST) Received: (from root@localhost) by www.pspl.co.in (8.11.6/8.11.6) id gB4FovO32692 for ; Wed, 4 Dec 2002 21:20:57 +0530 Received: from daithan (daithan.intranet.pspl.co.in [192.168.7.161]) by www.pspl.co.in (8.11.6/8.11.0) with ESMTP id gB4Foub32687 for ; Wed, 4 Dec 2002 21:20:57 +0530 From: "Shridhar Daithankar" To: "pgsql-hackers@postgresql.org" Date: Wed, 04 Dec 2002 21:21:24 +0530 MIME-Version: 1.0 Subject: Re: [ADMIN] how to alter sequence. Reply-To: shridhar_daithankar@persistent.co.in Message-ID: <3DEE71D4.21116.1940487@localhost> References: <1039010812.11433.75.camel@linda.lfix.co.uk> In-reply-to: <1039016518.2281.17.camel@rh72.home.ee> X-mailer: Pegasus Mail for Windows (v4.02) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/239 X-Sequence-Number: 32694 On 4 Dec 2002 at 20:41, Hannu Krosing wrote: > hannu=# update seq set max_value = 99; > ERROR: You can't change sequence relation seq > hannu=# update pg_class set relkind = 'r' where relname = 'seq'; > UPDATE 1 > hannu=# update seq set max_value = 99; > UPDATE 1 > hannu=# update pg_class set relkind = 'S' where relname = 'seq'; > UPDATE 1 > hannu=# select * from seq; > sequence_name | last_value | increment_by | max_value | min_value | > cache_value | log_cnt | is_cycled | is_called > ---------------+------------+--------------+-----------+-----------+-------------+---------+-----------+----------- > seq | 1 | 1 | 99 | 1 > | 1 | 1 | f | f That makes me wonder. If sequense is treated like a single column single row table and it's value is guarenteed to be increasing even in case of aborted transaction, is it correct to say that postgresql already has nested transactions, albeit dormant? Bye Shridhar -- Zero Defects, n.: The result of shutting down a production line.