Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VlOiC-0001ZK-2H for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Nov 2013 19:54:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VlOiB-0001a0-Gl for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Nov 2013 19:54:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VlOi9-0001YH-KB for pgsql-hackers@postgresql.org; Tue, 26 Nov 2013 19:54:17 +0000 Received: from eisentraut.org ([85.214.91.16] helo=gattler.pezone.net) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VlOi7-0006lx-Jl for pgsql-hackers@postgresql.org; Tue, 26 Nov 2013 19:54:17 +0000 Received: from jesse.mybdev.com (unknown [204.145.120.11]) by gattler.pezone.net (Postfix) with ESMTPSA id 508D359000F; Tue, 26 Nov 2013 19:54:13 +0000 (UTC) Message-ID: <5294FC63.2090401@gmx.net> Date: Tue, 26 Nov 2013 14:54:11 -0500 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Pavel Stehule CC: Robert Haas , Dean Rasheed , Tom Lane , Andres Freund , Tomas Vondra , PostgreSQL Hackers Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist References: <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> <5940.1384126931@sss.pgh.pa.us> <20131110235703.GJ32665@awork2.anarazel.de> <9280.1384132385@sss.pgh.pa.us> <528E85B9.2070200@gmx.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 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 11/24/13, 2:28 PM, Pavel Stehule wrote: > Note: DROP TRIGGER ON tablename is PostgreSQL feature - no other > databases (without PostgreSQL forks) uses this syntax - so we don't need > thinking what is in (or what will be) in ANSI standard (or what other > databases does). In this moment syntax of DROP TRIGGER is non standard. > So if we can adopt design (idea) in SQL anywhere or MySQL, then DROP > TRIGGER IF EXISTS should be enough. In our implementation there are two > conditions, but we should not to check if target table exists (from > statement purpose). Right, we might as well consider 'trigger ON tablename' to be the full name of the trigger and just treat it like a unit. But then a single IF EXISTS clause is still inconsistent with DROP TABLE nonexistent.foo, which fails if the schema does not exist. In other words, the IF EXISTS clause only applies to the end of an name chain. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers