pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Sriram Dandapani <sdandapani@counterpane.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: reset all sequences
Date: Thu, 4 May 2006 21:43:33 -0500
Message-ID: <20060505024333.GA12255@wolff.to> (raw)
In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF041C36B1@ca-mail1.cis.local>
References: <6992E470F12A444BB787B5C937B9D4DF041C36B1@ca-mail1.cis.local>

On Thu, May 04, 2006 at 14:20:39 -0700,
  Sriram Dandapani <sdandapani@counterpane.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.



view thread (7+ messages)  latest in thread

Message-ID: <20060505024333.GA12255@wolff.to>
Permalink:  ../20060505024333.GA12255@wolff.to/
Also on:    postgresql.org/message-id/20060505024333.GA12255@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruno@wolff.to, sdandapani@counterpane.com
  Subject: Re: reset all sequences
  In-Reply-To: <20060505024333.GA12255@wolff.to>
  References: <6992E470F12A444BB787B5C937B9D4DF041C36B1@ca-mail1.cis.local> <20060505024333.GA12255@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