Re: empty a database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dick Davies <rasputnik(at)hellooperator(dot)net>
Cc: PostgreSQL Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: empty a database
Date: 2005-02-15 16:31:57
Message-ID: 12827.1108485117@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dick Davies <rasputnik(at)hellooperator(dot)net> writes:
> Is there a neat way to clean out a database via SQL commands?
> i.e. get rid of tables, sequences, integers, etc.

> At present I'm using dropdb/createdb, but thats' far from ideal
> and I think it's causing postgres to do more mork than it needs to...

Well, if you put everything into one or a few schemas then dropping
and recreating those schemas would do it. I suspect though that this
is *not* faster than dropdb/createdb.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dick Davies 2005-02-15 16:41:46 Re: empty a database
Previous Message Dick Davies 2005-02-15 15:51:48 empty a database