pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-sql@postgresql.org
Subject: Re: Sequences
Date: Fri, 03 Jul 2009 17:35:41 -0400
Message-ID: <871vox4fgy.fsf@dba2.int.libertyrms.com> (raw)
References: <h2kuq1$3eh$01$1@news.t-online.com>

Andre Rothe <arothe@phosco.info> writes:
> Where are stored the sequence information? How I can query the
> properties of a sequence like increment, max/min value, cache?
> I'm looking for a table like user_sequences in Oracle, where I
> can query all of my sequences.

cbbrowne=# create sequence foo;
CREATE SEQUENCE
cbbrowne=# select * from foo;
 sequence_name | last_value | increment_by |      max_value      | min_value | cache_value | log_cnt | is_cycled | is_called
---------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
 foo           |          1 |            1 | 9223372036854775807 |         1 |           1 |       1 | f         | f
(1 row)

Each sequence is effectively a relation.
-- 
output = ("cbbrowne" "@" "cbbrowne.com")
http://www3.sympatico.ca/cbbrowne/wp.html
Where do you want to Tell Microsoft To Go Today?



view thread (19+ messages)  latest in thread

Message-ID: <871vox4fgy.fsf@dba2.int.libertyrms.com>
Permalink:  ../871vox4fgy.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/871vox4fgy.fsf@dba2.int.libertyrms.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: Sequences
  In-Reply-To: <871vox4fgy.fsf@dba2.int.libertyrms.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