Re: Function to total reset a schema

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Function to total reset a schema
Дата
Msg-id BANLkTinCSruCqUFNQkutKt_E8rZDYe=NKA@mail.gmail.com
обсуждение исходный текст
Ответ на Function to total reset a schema  (Surfing <onlinesurfing@gmail.com>)
Список pgsql-sql
On Sun, May 29, 2011 at 1:38 AM, Surfing <onlinesurfing@gmail.com> 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.

You shouldn't need to vacuum truncated tables, as they're basically at
a lower level just wiped out and replaced by a new empty file / table.Same goes for the indexes I believe.


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

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