Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format
Date
Msg-id 10105.1357518726@sss.pgh.pa.us
Whole thread Raw
In response to BUG #7792: pg_dump does not treat -c flag correctly when using tar format  (emesika@redhat.com)
Responses Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format
Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format
List pgsql-bugs
emesika@redhat.com writes:
> 1) pg_dump -F t -U postgres -f test.tar test
> 2) tar xvf test.tar  to any directory
> 3) vi restore.sql
> * restore.sql includes DROP statements for each object even tough -c flag
> was not given

I believe this is intentional - at least, pg_backup_tar.c goes out of
its way to make it happen.  (The forcible setting of ropt->dropSchema
in _CloseArchive is the cause, and it's hard to see why that would be
there unless the author intended this effect.)  Perhaps we should remove
that, but it would be an incompatible change.  Arguing for or against
it really requires a model of what people would be doing with the
restore.sql script.  I'm not entirely convinced that it should be
considered equivalent to what you'd get from a plain dump run.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7794: pg_dump: errors when using pipes/streams
Next
From: Tom Lane
Date:
Subject: Re: BUG #7793: tsearch_data thesaurus size limit