On Sun, May 29, 2011 at 1:38 AM, Surfing <[email protected]> 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. -- Sent via pgsql-sql mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql
