Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DE5F5476918; Thu, 5 Dec 2002 14:25:28 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 0C1F54767D6; Thu, 5 Dec 2002 14:18:26 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gB5JIFT23020; Thu, 5 Dec 2002 14:18:15 -0500 (EST) From: Bruce Momjian Message-Id: <200212051918.gB5JIFT23020@candle.pha.pa.us> Subject: Re: how to alter sequence. In-Reply-To: <200212051808.25911.mallah@trade-india.com> To: "Rajesh Kumar Mallah." Date: Thu, 5 Dec 2002 14:18:15 -0500 (EST) Cc: Oliver Elphick , raja kumar thatte , pgsql-hackers@postgresql.org, pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/54 X-Sequence-Number: 6549 I don't think you can drop/recreate the sequence because the dependency code knows other tables depend on it. --------------------------------------------------------------------------- Rajesh Kumar Mallah. wrote: > > Doesn't dropping and recreating the sequence suit the bill ? > > whats' the major advantage to implement em as a command? > > At least one thing from which all of us can benifit in PgSQL > is replication. I just hope 7.4 give us some sort of master/slave replication. > > > Regds > Mallah. > > > On Wednesday 04 December 2002 11:53 pm, Bruce Momjian wrote: > > Oliver Elphick wrote: > > > On Wed, 2002-12-04 at 12:29, raja kumar thatte wrote: > > > > Hai friends, > > > > I have a sequence called raj_seq with max value 3000. > > > > > > ... > > > > > > > now i wanted to increase the max value of the raj_seq > > > > to 9999999. > > > > How to do this change? > > > > If i drop and recreate the raj_seq, then i have to > > > > recreate the table and all triggers working on that > > > > table.But it is not an acceptable solution. > > > > So with out droping raj_seq , how do I solve this > > > > problem. > > > > > > Unfortunately there doesn't seem to be any easy way to do this. There > > > is no ALTER SEQUENCE command and you can't use UPDATE on a sequence. > > > > Gee, I thought they could just update the sequence table, but I see: > > > > test=> update yy set max_value = 100; > > ERROR: You can't change sequence relation yy > > > > > Hackers: Could this be a TODO item for 7.4? > > > > Added to TODO: > > > > * Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values > > -- > Rajesh Kumar Mallah, > Project Manager (Development) > Infocom Network Limited, New Delhi > phone: +91(11)6152172 (221) (L) ,9811255597 (M) > > Visit http://www.trade-india.com , > India's Leading B2B eMarketplace. > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073