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-28 14:16:05
Message-ID: 4DE103A5.9030900@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

Browse pgsql-sql by date

  From Date Subject
Next Message Surfing 2011-05-29 07:38:04 Function to total reset a schema
Previous Message Piotr Czekalski 2011-05-28 07:58:29 Re: Re: 500KB PDF files for postgresql8.3, which is the most efficient way?