Re: Statistics from Sequences - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Statistics from Sequences
Date
Msg-id 20050907033833.GB31843@wolff.to
Whole thread Raw
In response to Statistics from Sequences  (Joÿffffffffffe3o Carvalho<joaocarvalho127@yahoo.com.br>)
List pgsql-sql
On Tue, Sep 06, 2005 at 23:43:44 -0300, Joÿffffffffffe3o Carvalho <joaocarvalho127@yahoo.com.br> wrote:
> Is it possible to get from a sequence:
> 
>    The sequence owner
>    The min value
>    The max value
>    The increment value
>    The last used number

Yes. Associated with each sequence is a one row table with the name of the
sequence. Note that numbers can be allocated and not used, so the last_value
may not be exactly what you want.

To get the owner you can combine pg_class with pg_user to get the table
owner. I didn't see this information in the information schema.


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Statistics from Sequences
Next
From: Louise Catherine
Date:
Subject: AGE function