From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SEQUENCES |
Date: | 2006-10-02 16:49:06 |
Message-ID: | 20061002164905.GE32410@phlogiston.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Mon, Oct 02, 2006 at 01:39:38PM -0300, Rodrigo Sakai wrote:
>
> I need to get all sequences and their respective current values! Is there
> any catalog table or any other away to get this???
Here's a quick way to do it in a shell script, although it'd be sort
of inefficient:
for name in `psql -c "select relname from pg_class where relkind =
'S'" dbname; do psql -c "select last_value from $name" dbname; done.
A
--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
Unfortunately reformatting the Internet is a little more painful
than reformatting your hard drive when it gets out of whack.
--Scott Morris
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2006-10-02 16:51:04 | Re: SEQUENCES |
Previous Message | Rodrigo Sakai | 2006-10-02 16:39:38 | SEQUENCES |