Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 938F5632912 for ; Sat, 4 Jul 2009 09:35:24 -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 73538-04 for ; Sat, 4 Jul 2009 09:35:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mail.postgresql.org (Postfix) with ESMTP id 1813E62F482 for ; Sat, 4 Jul 2009 09:35:22 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 13so272248fge.0 for ; Sat, 04 Jul 2009 05:35:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=QpFCJ1/l7C5tOQGxjTkdPpscOtwalAypXBDaIQRHmhk=; b=EFeOTfdJIIju38t44one4nCUTW3+DQqYhPNM7Vyr72/UUwTzlCS9JmYPn2ca6uEZ5t OnvP6FvyxWFaQuj5cOEfQ+sVcjgsGa9w0YIhCJ01FqJdkGjVZ1+AAyHajmvXnzZxL24Z 2EolBCHrR4TwU0+vCBac42y89FbpnyN/CdskA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nji7vHoQHNLuBfJrY6+Cdlwrl7RCHPvRM0BsRnjGPxs/65hu8RjmQoixCEcDFrZeA7 Zs6Q3mhTGtxzcqKxIe9cQGoi44Tck7bQWiTadVP/JJ1AQiw02Dc50HPM8qvP7xbngaLf KhM59xSGsooS1LIGqj5QMuphZqzexlHZl0nII= MIME-Version: 1.0 Received: by 10.86.93.11 with SMTP id q11mr1418504fgb.6.1246710920991; Sat, 04 Jul 2009 05:35:20 -0700 (PDT) In-Reply-To: <871vox4fgy.fsf@dba2.int.libertyrms.com> References: <871vox4fgy.fsf@dba2.int.libertyrms.com> Date: Sat, 4 Jul 2009 14:35:20 +0200 Message-ID: Subject: Re: Sequences From: Jasmin Dizdarevic To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd2863a95540f046de081b1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200907/16 X-Sequence-Number: 32757 --000e0cd2863a95540f046de081b1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Nice Information. Does somebody know how to get the complete create-statement of an existing table/view? 2009/7/3 Chris Browne > 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=3D# create sequence foo; > CREATE SEQUENCE > cbbrowne=3D# 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 =3D ("cbbrowne" "@" "cbbrowne.com") > http://www3.sympatico.ca/cbbrowne/wp.html > Where do you want to Tell Microsoft To Go Today? > > -- > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql > --=20 Mit freundlichen Gr=FC=DFen Dizdarevic Jasmin Sonnenbergstr. 3 6714 N=FCziders, AUT jasmin.dizdarevic@gmail.com +43 664 411 79 29 --000e0cd2863a95540f046de081b1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Nice Information. Does somebody know how to get the complete create-stateme= nt of an existing table/view?

2009/7/3 Chris Browne <cbbrowne@acm.org>
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=3D# create sequence foo; CREATE SEQUENCE
cbbrowne=3D# select * from foo;
=A0sequence_name | la= st_value | increment_by | =A0 =A0 =A0max_value =A0 =A0 =A0| min_value | cac= he_value | log_cnt | is_cycled | is_called
---------------+------------+= --------------+---------------------+-----------+-------------+---------+--= ---------+-----------
=A0foo =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A01 | =A0 =A0 =A0 =A0 =A0 =A0= 1 | 9223372036854775807 | =A0 =A0 =A0 =A0 1 | =A0 =A0 =A0 =A0 =A0 1 | =A0 = =A0 =A0 1 | f =A0 =A0 =A0 =A0 | f
(1 row)

Each sequence is effect= ively a relation.
--
output =3D ("cbbrowne" "@" &= quot;cbbrowne.com&qu= ot;)
htt= p://www3.sympatico.ca/cbbrowne/wp.html
Where do you want to Tell Mic= rosoft To Go Today?

--
Sent via pgsql-sql= mailing list (pgsql-sql@postgr= esql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref= /pgsql-sql



--
Mit freundlichen Gr=FC=DFen

Dizdarevic Jasmin<= br>Sonnenbergstr. 3
6714 N=FCziders, AUT

jasmin.dizdarevic@gmail.com
+43 664 411 79 29=

--000e0cd2863a95540f046de081b1--