Re: Sequences

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Jasmin Dizdarevic <jasmin(dot)dizdarevic(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sequences
Date: 2009-07-04 17:26:39
Message-ID: dcc563d10907041026l51541afcy1353ec1972711c86@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Easiest way is with pg_dump -s -t tablename dbname

On Sat, Jul 4, 2009 at 6:35 AM, Jasmin
Dizdarevic<jasmin(dot)dizdarevic(at)gmail(dot)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(at)acm(dot)org>
>>
>> Andre Rothe <arothe(at)phosco(dot)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(at)postgresql(dot)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(dot)dizdarevic(at)gmail(dot)com
> +43 664 411 79 29
>
>

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andre Rothe 2009-07-04 20:50:53 Re: Sequences
Previous Message Jasmin Dizdarevic 2009-07-04 12:35:20 Re: Sequences