Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts0dP-000235-Sk for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jan 2013 00:32:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ts0dP-00061J-Af for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jan 2013 00:32:11 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts0dO-00061E-QX for pgsql-bugs@postgresql.org; Mon, 07 Jan 2013 00:32:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ts0dL-0002vt-Vw for pgsql-bugs@postgresql.org; Mon, 07 Jan 2013 00:32:10 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r070W66k010106; Sun, 6 Jan 2013 19:32:06 -0500 (EST) From: Tom Lane To: emesika@redhat.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7792: pg_dump does not treat -c flag correctly when using tar format In-reply-to: References: Comments: In-reply-to emesika@redhat.com message dated "Sun, 06 Jan 2013 13:45:01 +0000" Date: Sun, 06 Jan 2013 19:32:06 -0500 Message-ID: <10105.1357518726@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs