Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUJVU-0000s9-3A for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Oct 2013 16:54:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VUJVT-00033x-In for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Oct 2013 16:54:35 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUJVS-00033c-Ff for pgsql-hackers@postgresql.org; Thu, 10 Oct 2013 16:54:34 +0000 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUJVP-0006Ro-OV for pgsql-hackers@postgresql.org; Thu, 10 Oct 2013 16:54:33 +0000 Received: from mfilter26-d.gandi.net (mfilter26-d.gandi.net [217.70.178.154]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 2B5CBA80B5; Thu, 10 Oct 2013 18:54:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter26-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter26-d.gandi.net (mfilter26-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id Nrxlzs7kJJMU; Thu, 10 Oct 2013 18:54:28 +0200 (CEST) X-Originating-IP: 98.27.58.255 Received: from [192.168.10.146] (cpe-098-027-058-255.nc.res.rr.com [98.27.58.255]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id EB40EA80BB; Thu, 10 Oct 2013 18:54:24 +0200 (CEST) Message-ID: <5256DBBF.8010605@dunslane.net> Date: Thu, 10 Oct 2013 12:54:23 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pavel Stehule CC: Satoshi Nagayasu , Josh Kupershmidt , Tom Lane , Bruce Momjian , Dave Rolsky , pgsql-hackers Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist References: <20130215234637.GH12030@momjian.us> <11257.1361032501@sss.pgh.pa.us> <5236B11B.8040700@uptime.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 09/19/2013 06:12 PM, Pavel Stehule wrote: > > > 2013/9/16 Satoshi Nagayasu > > > > > I'm looking at this patch, and I have a question here. > > Should "DROP TRIGGER IF EXISTS" ignore error for non-existing trigger > and non-existing table? Or just only for non-existing trigger? > > > My opinion is so, both variants should be ignored - it should be fully > fault tolerant in this use case. > > This thread seems to have gone cold, but I'm inclined to agree with Pavel. If the table doesn't exist, neither does the trigger, and the whole point of the 'IF EXISTS' variants is to provide the ability to issue DROP commands that don't fail if their target is missing. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers