X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8F6398BA1B0 for ; Tue, 15 Feb 2005 16:32:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75417-06 for ; Tue, 15 Feb 2005 16:32:02 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 826F18BA17F for ; Tue, 15 Feb 2005 16:32:02 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j1FGVvUU012828; Tue, 15 Feb 2005 11:31:57 -0500 (EST) To: Dick Davies Cc: PostgreSQL Admin Subject: Re: empty a database In-reply-to: <20050215155148.GZ63378@eris.tenfour> References: <20050215155148.GZ63378@eris.tenfour> Comments: In-reply-to Dick Davies message dated "Tue, 15 Feb 2005 15:51:48 +0000" Date: Tue, 15 Feb 2005 11:31:57 -0500 Message-ID: <12827.1108485117@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/123 X-Sequence-Number: 16291 Dick Davies 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