pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Oliver Elphick <olly@lfix.co.uk>
Cc: raja kumar thatte <trajakumar@yahoo.com>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: how to alter sequence.
Date: Wed, 4 Dec 2002 13:23:40 -0500 (EST)
Message-ID: <200212041823.gB4INeQ07044@candle.pha.pa.us> (raw)
In-Reply-To: <1039010812.11433.75.camel@linda.lfix.co.uk>

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

-- 
  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



view thread (23+ messages)  latest in thread

Message-ID: <200212041823.gB4INeQ07044@candle.pha.pa.us>
Permalink:  ../200212041823.gB4INeQ07044@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200212041823.gB4INeQ07044@candle.pha.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: pgman@candle.pha.pa.us, olly@lfix.co.uk, trajakumar@yahoo.com, pgsql-hackers@postgresql.org
  Subject: Re: how to alter sequence.
  In-Reply-To: <200212041823.gB4INeQ07044@candle.pha.pa.us>
  References: <1039010812.11433.75.camel@linda.lfix.co.uk> <200212041823.gB4INeQ07044@candle.pha.pa.us>

* 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