Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfee5-0005s0-1C for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Nov 2013 23:42:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vfee4-0005pc-Hx for pgsql-hackers@arkaria.postgresql.org; Sun, 10 Nov 2013 23:42:20 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfee3-0005pU-Id for pgsql-hackers@postgresql.org; Sun, 10 Nov 2013 23:42:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vfee1-000727-A0 for pgsql-hackers@postgresql.org; Sun, 10 Nov 2013 23:42:19 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rAANgBRs005941; Sun, 10 Nov 2013 18:42:11 -0500 From: Tom Lane To: Andres Freund cc: Tomas Vondra , pgsql-hackers@postgresql.org Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist In-reply-to: <20131110233247.GH32665@awork2.anarazel.de> References: <5256DBBF.8010605@dunslane.net> <20131014214421.GE25013@awork2.anarazel.de> <525C6ED3.9090701@fuzzy.cz> <20131014222800.GH25013@awork2.anarazel.de> <3210.1384118907@sss.pgh.pa.us> <20131110221159.GD32665@awork2.anarazel.de> <5459.1384125376@sss.pgh.pa.us> <20131110232355.GG32665@awork2.anarazel.de> <5647.1384125986@sss.pgh.pa.us> <20131110233247.GH32665@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 11 Nov 2013 00:32:47 +0100" Date: Sun, 10 Nov 2013 18:42:11 -0500 Message-ID: <5940.1384126931@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-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > ... So we'd get approximately one line further unless we fix this for DROP > DEFAULT and DROP CONSTRAINT as well. True. As far as pg_dump --clean is concerned, it'd undoubtedly be easier if we did what you suggest and just eliminate the emitted DROP commands for table components, relying on the assumption that there'll never be a partial-dump mode that would allow dumping a table's components without the table. However, the server-side approach has the benefit that it'll likely make life easier for other applications besides pg_dump. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers