Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date
Msg-id 20130215203205.GC12030@momjian.us
Whole thread Raw
In response to BUG #7873: pg_restore --clean tries to drop tables that don't exist  (autarch@urth.org)
Responses Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist
List pgsql-bugs
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.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

pgsql-bugs by date:

Previous
From: david.thomas@enterprisedb.com
Date:
Subject: BUG #7885: postmaster panic on startup does not release shared memory
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #7874: GUC's not in database dumps