Re: How to drop all the sequences - Mailing list pgsql-general

From Berend Tober
Subject Re: How to drop all the sequences
Date
Msg-id 64529.216.238.112.88.1045833822.squirrel@$HOSTNAME
Whole thread Raw
In response to Re: How to drop all the sequences  (Neil Conway <neilc@samurai.com>)
List pgsql-general
> On Thu, 2003-02-20 at 11:40, Arunachalam Jaisankar wrote:
>
>> It is too difficult to drop all sequences one by one manually. Is
>> there any command to drop all sequences in a database?
>
> No. You could try iterating through pg_class, picking out the sequence
> relations (relkind = 'S') in the right database, and then dropping the
> sequences that way.
>

This is what I do:

Save the output of

SELECT 'drop sequence ' || c.relname || ';' FROM pg_class c WHERE
(c.relkind = 'S');

to a file and then run that.

~Berend Tober




pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Problem with aliasing
Next
From: Patrick Welche
Date:
Subject: Re: jdbc in OO