pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joel Burton <joel@joelburton.com>
To: Dustin Sallings <dustin@spy.net>
Cc: Hannu Krosing <hannu@tm.ee>
Cc: Oliver Elphick <olly@lfix.co.uk>
Cc: raja kumar thatte <trajakumar@yahoo.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: [HACKERS] how to alter sequence.
Date: Wed, 4 Dec 2002 12:44:50 -0500
Message-ID: <20021204174450.GA17010@temp.joelburton.com> (raw)
In-Reply-To: <Pine.SGI.4.50.0212040933410.22447-100000@bleu.west.spy.net>
References: <20021204122900.96540.qmail@web20608.mail.yahoo.com>
	<1039010812.11433.75.camel@linda.lfix.co.uk>
	<1039016518.2281.17.camel@rh72.home.ee>
	<Pine.SGI.4.50.0212040933410.22447-100000@bleu.west.spy.net>

On Wed, Dec 04, 2002 at 09:33:52AM -0800, Dustin Sallings wrote:
> Around 20:41 on Dec 4, 2002, Hannu Krosing said:
> 
> 	What's wrong with this:
> 
> dustin=# create sequence test_seq;
> CREATE SEQUENCE
> dustin=# select nextval('test_seq');
>  nextval
> ---------
>        1
> (1 row)
> 
> dustin=# select setval('test_seq', 9999);
>  setval
> --------
>    9999
> (1 row)
> 
> dustin=# select nextval('test_seq');
>  nextval
> ---------
>    10000
> (1 row)

Dustin --

The thread here is about how to raise the *max* value for the sequence,
not how to set the current value higher. The sequence in question was
created with a too-low maximum value (see help on CREATE SEQUENCE for
options); the user now wants to raise it.

- J.
-- 

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant



view thread (23+ messages)  latest in thread

Message-ID: <20021204174450.GA17010@temp.joelburton.com>
Permalink:  ../20021204174450.GA17010@temp.joelburton.com/
Also on:    postgresql.org/message-id/20021204174450.GA17010@temp.joelburton.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 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: joel@joelburton.com, dustin@spy.net, hannu@tm.ee, olly@lfix.co.uk, trajakumar@yahoo.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] how to alter sequence.
  In-Reply-To: <20021204174450.GA17010@temp.joelburton.com>
  References: <20021204122900.96540.qmail@web20608.mail.yahoo.com> <1039010812.11433.75.camel@linda.lfix.co.uk> <1039016518.2281.17.camel@rh72.home.ee> <Pine.SGI.4.50.0212040933410.22447-100000@bleu.west.spy.net> <20021204174450.GA17010@temp.joelburton.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