Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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



pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group