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

From Josh Kupershmidt
Subject Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date
Msg-id CAK3UJRGEmtV477gu8Rvh+TUcRQHQcsHc=c0Ynu=3KDdV+Vxarw@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Fri, Mar 8, 2013 at 2:23 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2013/3/8 Josh Kupershmidt <schmiddy@gmail.com>:

>> Cool. I think it would also be useful to check that --clean may only
>> be used with --format=p to avoid any confusion there. (This issue
>> could be addressed in a separate patch if you'd rather not lard this
>> patch.)
>
> no
>
> some people - like we in our company would to use this feature for
> quiet and strict mode for plain text format too.
>
> enabling this feature has zero overhead so there are no reason block
> it anywhere.

I'm not sure I understand what you're getting at, but maybe my
proposal wasn't so clear. Right now, you can specify --clean along
with -Fc to pg_dump, and pg_dump will not complain even though this
combination is nonsense. I am proposing that pg_dump error out in this
case, i.e.
 $ pg_dump -Fc --file=test.dump --clean -d test pg_dump: option --clean only valid with plain format dump

Although this lack of an error a (IMO) misfeature of existing pg_dump,
so if you'd rather leave this issue aside for your patch, that is
fine.

Josh



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Performance Improvement by reducing WAL for Update Operation
Next
From: Alvaro Herrera
Date:
Subject: Re: sql_drop Event Triggerg