pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Jasmin Dizdarevic <jasmin.dizdarevic@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Sequences
Date: Sat, 4 Jul 2009 11:26:39 -0600
Message-ID: <dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.com> (raw)
In-Reply-To: <a0eee4d40907040535tf4cf625y891a923832f86035@mail.gmail.com>
References: <h2kuq1$3eh$01$1@news.t-online.com>
	<871vox4fgy.fsf@dba2.int.libertyrms.com>
	<a0eee4d40907040535tf4cf625y891a923832f86035@mail.gmail.com>

Easiest way is with pg_dump -s -t tablename dbname

On Sat, Jul 4, 2009 at 6:35 AM, Jasmin
Dizdarevic<jasmin.dizdarevic@gmail.com> wrote:
> Nice Information. Does somebody know how to get the complete
> create-statement 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=# 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?
>>
>> --
>> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-sql
>
>
>
> --
> Mit freundlichen Grüßen
>
> Dizdarevic Jasmin
> Sonnenbergstr. 3
> 6714 Nüziders, AUT
>
> jasmin.dizdarevic@gmail.com
> +43 664 411 79 29
>
>



-- 
When fascism comes to America, it will be intolerance sold as diversity.



view thread (19+ messages)  latest in thread

Message-ID: <dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.com>
Permalink:  ../dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.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: scott.marlowe@gmail.com, jasmin.dizdarevic@gmail.com
  Subject: Re: Sequences
  In-Reply-To: <dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.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