pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
Cc: pgsql-sql@postgresql.org
Subject: Re: SEQUENCES
Date: Tue, 3 Oct 2006 09:59:58 -0500
Message-ID: <20061003145958.GA29003@wolff.to> (raw)
In-Reply-To: <001801c6e641$6093f5d0$4700a8c0@TREEZANTHUS>
References: <001801c6e641$6093f5d0$4700a8c0@TREEZANTHUS>

On Mon, Oct 02, 2006 at 13:39:38 -0300,
  Rodrigo Sakai <rodrigo.sakai@zanthus.com.br> wrote:
>   Hi all,
> 
>  
> 
>   I need to get all sequences and their respective current values! Is there
> any catalog table or any other away to get this???

You can get their names from pg_class (with relkind = 'S') and then iterate
over the names and look at the table underlying each table (at last_value).



view thread (19+ messages)  latest in thread

Message-ID: <20061003145958.GA29003@wolff.to>
Permalink:  ../20061003145958.GA29003@wolff.to/
Also on:    postgresql.org/message-id/20061003145958.GA29003@wolff.to

 · 

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: bruno@wolff.to, rodrigo.sakai@zanthus.com.br
  Subject: Re: SEQUENCES
  In-Reply-To: <20061003145958.GA29003@wolff.to>

* 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