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

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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unlisten / listen in a transaction failure
Next
From: joe@tanga.com
Date:
Subject: BUG #7874: GUC's not in database dumps