Received: from lists.unixathome.org (lists.unixathome.org [210.48.103.158]) by postgresql.org (Postfix) with ESMTP id 6424847615A for ; Mon, 4 Mar 2002 13:32:09 -0500 (EST) Received: from wocker (lists.unixathome.org [210.48.103.158]) by lists.unixathome.org (8.11.6/8.11.6) with ESMTP id g24IW2k78903; Tue, 5 Mar 2002 07:32:03 +1300 (NZDT) (envelope-from dan@lists.unixathome.org) Message-Id: <200203041832.g24IW2k78903@lists.unixathome.org> From: "Dan Langille" Organization: DVL Software Limited To: Matthew Price Date: Mon, 4 Mar 2002 13:32:01 -0500 MIME-Version: 1.0 Subject: Re: Changing sequence cache Reply-To: dan@langille.org Cc: pgsql-sql@postgresql.org In-reply-to: <20020304.130237.19811.60399@wm7.jersey.juno.com> X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Archive-Number: 200203/37 X-Sequence-Number: 6919 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