Re: How to drop all the sequences

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Re: How to drop all the sequences
Дата
Msg-id 64529.216.238.112.88.1045833822.squirrel@$HOSTNAME
обсуждение исходный текст
Ответ на Re: How to drop all the sequences  (Neil Conway <neilc@samurai.com>)
Список 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 по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Problem with aliasing
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: jdbc in OO