pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Ok,, what about cache for SEQUENCE - where? how?
2+ messages / 2 participants
[nested] [flat]

* Ok,, what about cache for SEQUENCE - where? how?
@ 2003-04-21 04:25  foo2@on-spammers2.com
  0 siblings, 1 reply; 2+ messages in thread

From: foo2@on-spammers2.com @ 2003-04-21 04:25 UTC (permalink / raw)
  To: pgsql-sql

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

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.

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?

Thanks for any answers.


Walt
Software Engineer
Black Belt Systems
pages: http://www.blackbeltsystems.com/
email: http://www.blackbeltsystems.com/contact.html




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Ok,, what about cache for SEQUENCE - where? how?
@ 2003-04-23 20:29  Bruno Wolff III <bruno@wolff.to>
  parent: foo2@on-spammers2.com
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2003-04-23 20:29 UTC (permalink / raw)
  To: the2@newsgroup2.com; +Cc: pgsql-sql

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 .




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-04-23 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-21 04:25 Ok,, what about cache for SEQUENCE - where? how? foo2@on-spammers2.com
2003-04-23 20:29 ` Bruno Wolff III <bruno@wolff.to>

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