From: Andre Rothe <arothe@phosco.info>
To: pgsql-sql@postgresql.org
Subject: Re: Sequences
Date: Sat, 04 Jul 2009 22:50:53 +0200
Message-ID: <h2ofbd$n7g$01$1@news.t-online.com> (raw)
In-Reply-To: <871vox4fgy.fsf@dba2.int.libertyrms.com>
References: <h2kuq1$3eh$01$1@news.t-online.com>
<871vox4fgy.fsf@dba2.int.libertyrms.com>
Thanks, I have used
SELECT sequence_name FROM information_schema.sequences WHERE
sequence_catalog=? AND sequence_schema=?
and then I can use
select * from <sequence-name>
It seems to work :-)
Andre
Chris Browne wrote:
> 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.
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: arothe@phosco.info
Subject: Re: Sequences
In-Reply-To: <h2ofbd$n7g$01$1@news.t-online.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