Function to total reset a schema

From: Surfing <onlinesurfing(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Function to total reset a schema
Date: 2011-05-29 07:38:04
Message-ID: 4DE1F7DC.3080700@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2011-05-29 07:49:53 Re: Function to total reset a schema
Previous Message Surfing 2011-05-28 14:16:05 Function to total reset a schema