pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: the2@newsgroup2.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Ok,, what about cache for SEQUENCE - where? how?
Date: Wed, 23 Apr 2003 15:29:26 -0500
Message-ID: <20030423202926.GA13462@wolff.to> (raw)
In-Reply-To: <525670e62aba2d75120f5657c77add8b@news.teranews.com>
References: <525670e62aba2d75120f5657c77add8b@news.teranews.com>

On Mon, Apr 21, 2003 at 04:25:44 +0000,
  foo2@on-spammers2.com wrote:
> The postgreSQL docs wave dire warnigns about the cache setting; if it
> is greater than one, apparently, sequences don't work (or at least,
> they work in a manner that isn't useful in the same way.)

Yes they will still work usefully for what they are supposed to be
used for. The will give you unique identifiers. You are more likely
to get gaps this way, but you can get gaps anyway and shouldn't
expect sequences to give you gap free lists of unique identifiers.

> But the docs fail to point out where one could set, or even learn
> about, the cache setting. A search of the docs for "cache" turns up
> quite apparently useless references.

This is described in the documentation for the create sequence and alter
sequence commands.

> 
> So - where is the cache setting, and if that's only part of the
> answer, how does one see what it is set to? If it's set to two or
> more, how does one set it back to one so sequences will be guaranteed
> to work?

You can use select cache_value from sequence_name .




view thread (2+ messages)

Message-ID: <20030423202926.GA13462@wolff.to>
Permalink:  ../20030423202926.GA13462@wolff.to/
Also on:    postgresql.org/message-id/20030423202926.GA13462@wolff.to

 · 

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: bruno@wolff.to, the2@newsgroup2.com
  Subject: Re: Ok,, what about cache for SEQUENCE - where? how?
  In-Reply-To: <20030423202926.GA13462@wolff.to>

* 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