Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 485CB632ED3 for ; Sat, 4 Jul 2009 18:12:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 67998-04 for ; Sat, 4 Jul 2009 18:12:56 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 21CBC632E45 for ; Sat, 4 Jul 2009 18:12:57 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id n64LCrMJ031766 for ; Sat, 4 Jul 2009 18:12:53 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id n64Kq8Nh071635 for pgsql-sql@postgresql.org; Sat, 4 Jul 2009 17:52:08 -0300 (ADT) (envelope-from news) From: Andre Rothe X-Newsgroups: pgsql.sql Subject: Re: Sequences Date: Sat, 04 Jul 2009 22:50:53 +0200 Organization: T-Online Lines: 28 Message-ID: References: <871vox4fgy.fsf@dba2.int.libertyrms.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet-abuse@t-online.de X-ID: VPzoK8ZrrePMySo2HIvNrnBIrKIO4XTr19RdPgM72eLWJVgIqgmcw9 User-Agent: Thunderbird 2.0.0.21 (X11/20090320) In-Reply-To: <871vox4fgy.fsf@dba2.int.libertyrms.com> To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/25 X-Sequence-Number: 32766 Thanks, I have used SELECT sequence_name FROM information_schema.sequences WHERE sequence_catalog=? AND sequence_schema=? and then I can use select * from It seems to work :-) Andre Chris Browne wrote: > Andre Rothe 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.