pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Surfing <onlinesurfing@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Function to total reset a schema
Date: Sun, 29 May 2011 09:38:04 +0200
Message-ID: <4DE1F7DC.3080700@gmail.com> (raw)

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




view thread (6+ messages)  latest in thread

Message-ID: <4DE1F7DC.3080700@gmail.com>
Permalink:  ../4DE1F7DC.3080700@gmail.com/
Also on:    postgresql.org/message-id/4DE1F7DC.3080700@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: onlinesurfing@gmail.com
  Subject: Re: Function to total reset a schema
  In-Reply-To: <4DE1F7DC.3080700@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox