Re: reset all sequences

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Sriram Dandapani <sdandapani(at)counterpane(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: reset all sequences
Date: 2006-05-05 02:43:33
Message-ID: 20060505024333.GA12255@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, May 04, 2006 at 14:20:39 -0700,
Sriram Dandapani <sdandapani(at)counterpane(dot)com> wrote:
> Hi
>
>
>
> I have a scenario where I need to reset all sequences(about 400). Is
> there a system table that I can query to get a list of sequences
> (Postgres 8.1.x)

You can do something like:
select * from pg_class where relkind = 'S';
The relname column will give you the sequence name.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Steve Burrows 2006-05-05 08:47:12 Re: How to find current running process
Previous Message Mark Liberman 2006-05-05 01:48:25 Re: Tale partitioning