Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6TiP-0004bn-FB for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Feb 2013 22:25:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U6TiO-00085F-Ri for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Feb 2013 22:25:08 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6TQ8-0006r1-KM for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 22:06:16 +0000 Received: from urth.org ([173.11.48.50]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U6TQ6-0006ns-Oz for pgsql-bugs@postgresql.org; Fri, 15 Feb 2013 22:06:15 +0000 Received: by urth.org (Postfix, from userid 1000) id 418BF170EAF; Fri, 15 Feb 2013 16:06:12 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by urth.org (Postfix) with ESMTP id B8DE317004F; Fri, 15 Feb 2013 16:06:12 -0600 (CST) Date: Fri, 15 Feb 2013 16:06:12 -0600 (CST) From: Dave Rolsky To: Bruce Momjian cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist In-Reply-To: <20130215203205.GC12030@momjian.us> Message-ID: References: <20130215203205.GC12030@momjian.us> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, 15 Feb 2013, Bruce Momjian wrote: > On Wed, Feb 13, 2013 at 08:22:43PM +0000, autarch@urth.org wrote: >> The following bug has been logged on the website: >> >> Bug reference: 7873 >> Logged by: Dave Rolsky >> Email address: autarch@urth.org >> PostgreSQL version: 9.2.3 >> Operating system: Linux >> Description: >> >> When you pass the --clean option to pg_restore it tries to drop tables >> without checking if they exist. This results in lots of error output. If >> you're running pg_restore via an automated process it's very hard to >> distinguish between these "ok" errors and real errors. >> >> It should be using "DROP TABLE IF EXISTS" and the equivalent for >> constraints. > > Well, I think the question is whether you want error feedback for things > that don't exist. I don't really know the answer. Fair enough. It should probably an option to add "if exists", at least. I can't imagine I'm the only using this tool to ship database updates around to different machines, some of which may not have new tables. I'd really like to be able to know when the restore fails versus when it succeeds but is noisy. Cheers, -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/ -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs