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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: autarch(at)urth(dot)org
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date: 2013-02-15 20:32:05
Message-ID: 20130215203205.GC12030@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Feb 13, 2013 at 08:22:43PM +0000, autarch(at)urth(dot)org wrote:
> The following bug has been logged on the website:
>
> Bug reference: 7873
> Logged by: Dave Rolsky
> Email address: autarch(at)urth(dot)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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2013-02-15 20:33:47 Re: BUG #7874: GUC's not in database dumps
Previous Message Maciek Sakrejda 2013-02-15 18:57:10 Re: BUG #7883: "PANIC: WAL contains references to invalid pages" on replica recovery

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-02-15 21:28:05 Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)
Previous Message Manlio Perillo 2013-02-15 20:23:18 Re: [RFC] ideas for a new Python DBAPI driver (was Re: libpq test suite)