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 7D2E98B9FE2 for ; Wed, 16 Feb 2005 23:15:59 +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 63606-01 for ; Wed, 16 Feb 2005 23:15:53 +0000 (GMT) Received: from 9.hellooperator.net (cpc3-cdif2-3-0-cust202.cdif.cable.ntl.com [81.103.32.202]) by svr1.postgresql.org (Postfix) with ESMTP id E219F8B9BDF for ; Wed, 16 Feb 2005 23:15:55 +0000 (GMT) Received: from [10.4.0.5] (helo=eris.tenfour) by 9.hellooperator.net with esmtp (Exim 4.43) id 1D1YOe-00069i-JE; Wed, 16 Feb 2005 23:15:53 +0000 Received: from rasputnik by eris.tenfour with local (Exim 4.44 (FreeBSD)) id 1D1YOe-000HG4-Ft; Wed, 16 Feb 2005 23:15:52 +0000 Date: Wed, 16 Feb 2005 23:15:52 +0000 From: Dick Davies To: Christopher Browne Cc: PostgreSQL Admin Subject: Re: empty a database Message-ID: <20050216231552.GH64242@eris.tenfour> Reply-To: Dick Davies References: <20050215155148.GZ63378@eris.tenfour> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.52 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL X-Spam-Level: * X-Archive-Number: 200502/152 X-Sequence-Number: 16320 * Christopher Browne [0223 20:23]: > Clinging to sanity, rasputnik@hellooperator.net (Dick Davies) mumbled into her beard: > > 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... > > If you truly need for all of the objects to go away, dropping the > database seems like a reasonable way to do this. I'm not sure what > work you are imagining is "too much" or "unnecessary." It just seems a bit extreme, but the alternatives are all a bit gnarly, so think I'll live with it.... Thanks for all the suggestions, though, everybody. -- 'The old 'give em a Linux box and they think they're Jean-Luc Picard' syndrome.' -- Pete Bentley Rasputin :: Jack of All Trades - Master of Nuns