pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Langille <dan@langille.org>
To: Matthew Price <pricem@juno.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Changing sequence cache
Date: Mon, 4 Mar 2002 13:32:01 -0500
Message-ID: <200203041832.g24IW2k78903@lists.unixathome.org> (raw)
In-Reply-To: <20020304.130237.19811.60399@wm7.jersey.juno.com>

On 4 Mar 2002 at 18:02, Matthew Price wrote:

> I already have a sequence named customers_custid_seq
> 
> I would like to increase the cache setting some.  How can i alter the cache
> after the sequence has already been created?
> 
> Trying:
> update customer_custid_seq set cache=5;
> Gives this:
> ERROR:  You can't change sequence relation customer_custid_seq

test=# create sequence mprice;
CREATE

test=# select nextval('mprice');
 nextval
---------
       1
(1 row)

test=# select setval('mprice', 23);
 setval
--------
     23
(1 row)

test=# select nextval('mprice');
 nextval
---------
      24
(1 row)

test=#
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples




view thread (4+ messages)  latest in thread

Message-ID: <200203041832.g24IW2k78903@lists.unixathome.org>
Permalink:  ../200203041832.g24IW2k78903@lists.unixathome.org/
Also on:    postgresql.org/message-id/200203041832.g24IW2k78903@lists.unixathome.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dan@langille.org, pricem@juno.com
  Subject: Re: Changing sequence cache
  In-Reply-To: <200203041832.g24IW2k78903@lists.unixathome.org>

* 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