Re: reset all sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks..that really helped!!

-----Original Message-----
From: Bruno Wolff III [mailto:bruno@xxxxxxxx] 
Sent: Thursday, May 04, 2006 7:44 PM
To: Sriram Dandapani
Cc: pgsql-admin@xxxxxxxxxxxxxx
Subject: Re: reset all sequences

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux