Re: Function to total reset a schema

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: Function to total reset a schema
Дата
Msg-id 4DE3AD86.5020206@gmail.com
обсуждение исходный текст
Ответ на Function to total reset a schema  (Surfing <onlinesurfing@gmail.com>)
Список pgsql-sql
I would hope you have readily at hand the ddl for the schema in 
question.  Then it's simply a matter of drop schema <name> cascade and 
re-run you ddl scripts.

Surfing wrote:
> Hi all,
> I need to write a function that totally empty a schema.
>
> So I have written a TRUNCATE statement for each table and set to 0 
> each sequence.
> Btw, it could be good to execute a vacuum statement on each table, but 
> from within the function this is not allowed.
>
> Is there a way to obtain the same result in another way (without using 
> the vacuum)?
>
> Thanks
>
>


В списке pgsql-sql по дате отправления:

Предыдущее
От: Surfing
Дата:
Сообщение: Re: Function to total reset a schema
Следующее
От: Surfing
Дата:
Сообщение: Function to total reset a schema