From: | Naomi Walker <nwalke(at)eldocomp(dot)com> |
---|---|
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 17:24:41 |
Message-ID: | 42123059.2070505@eldocomp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
How about just truncating all the tables?
Dick Davies wrote:
> * Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [0232 16:32]:
>
>>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.
>
>
> Thanks Tom.
>
> It's not just the speed, it's the constant deletes and creations in
> ~pgsql/data - as I said the other day, this is recreating a test db from the
> production one as part of unit tests, so this happens dozens of times a day...
>
>
--
-------------------------------------------------------------------------
Naomi Walker Chief Information Officer
Eldorado Computing, Inc. nwalker(at)eldocomp(dot)com 602-604-3100
-------------------------------------------------------------------------
Courage is the power to let go the familiar. -Raymond Lindquist
-------------------------------------------------------------------------
-- CONFIDENTIALITY NOTICE --
This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Browne | 2005-02-15 18:56:44 | Re: empty a database |
Previous Message | Dick Davies | 2005-02-15 16:41:46 | Re: empty a database |