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

Поиск
Список
Период
Сортировка
От Dave Rolsky
Тема Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist
Дата
Msg-id alpine.DEB.2.00.1302151604450.13270@urth.org
обсуждение исходный текст
Ответ на Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
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)
============================================================*/

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #7886: date_trunc(date) returning timestamptz instead of timestamp
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: BUG #7883: "PANIC: WAL contains references to invalid pages" on replica recovery