Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVqAw-0001aH-1Z for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Oct 2013 21:59:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VVqAv-0003ah-Gl for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Oct 2013 21:59:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVqAt-0003Z9-RW for pgsql-hackers@postgresql.org; Mon, 14 Oct 2013 21:59:39 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVqAr-00033s-Dj for pgsql-hackers@postgresql.org; Mon, 14 Oct 2013 21:59:39 +0000 Received: from mfilter28-d.gandi.net (mfilter28-d.gandi.net [217.70.178.159]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id BCBCC41C06D; Mon, 14 Oct 2013 23:59:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter28-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter28-d.gandi.net (mfilter28-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id PRchZ7Vr03VX; Mon, 14 Oct 2013 23:59:31 +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 relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 676B941C075; Mon, 14 Oct 2013 23:59:26 +0200 (CEST) Message-ID: <525C693D.3090105@dunslane.net> Date: Mon, 14 Oct 2013 17:59:25 -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: Andres Freund CC: Pavel Stehule , 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: <5236B11B.8040700@uptime.jp> <5256DBBF.8010605@dunslane.net> <20131014214421.GE25013@awork2.anarazel.de> In-Reply-To: <20131014214421.GE25013@awork2.anarazel.de> Content-Type: text/plain; charset=ISO-8859-1; 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 10/14/2013 05:44 PM, Andres Freund wrote: > On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: >> 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. > -1, this seems to likely to just hide typos. > So if I say DROP TRIGGER IF EXISTS foo ON bar; you're ok with succeeding if foo is a typo, but not if bar is? 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