pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Tomas Vondra <tv@fuzzy.cz>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date: Tue, 26 Nov 2013 14:54:11 -0500
Message-ID: <5294FC63.2090401@gmx.net> (raw)
In-Reply-To: <CAFj8pRBg8i6HP6Uv_sPOihzS7Xy6DdgfFOnbLThys46v3gtgFg@mail.gmail.com>
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>
	<CAFj8pRAt_Dp0n0yecmpiPyYeMHT8mcaPNe+UsLoGgd20ZXKY=w@mail.gmail.com>
	<CAFj8pRBQOC4LZmYenGtpZAS=Vt+YTbc8s1UQXTEtcNmVegOv5g@mail.gmail.com>
	<CAEZATCXCOZDREmkjZtu4x5xFZ7rSZB_WtTBSaUH2fm8ocoqCKw@mail.gmail.com>
	<CA+Tgmoa4g3To_K+K-6oinXzpZHTGttkFC1kwopink90+umHUQQ@mail.gmail.com>
	<CAFj8pRBtY8ayyVYKLhSFJHL68-QdDJxFAFQ_Cm7H+3AN663RnQ@mail.gmail.com>
	<528E85B9.2070200@gmx.net>
	<CAFj8pRBg8i6HP6Uv_sPOihzS7Xy6DdgfFOnbLThys46v3gtgFg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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



view thread (83+ messages)  latest in thread

Message-ID: <5294FC63.2090401@gmx.net>
Permalink:  ../5294FC63.2090401@gmx.net/
Also on:    postgresql.org/message-id/5294FC63.2090401@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter_e@gmx.net, pavel.stehule@gmail.com, robertmhaas@gmail.com, dean.a.rasheed@gmail.com, tgl@sss.pgh.pa.us, andres@2ndquadrant.com, tv@fuzzy.cz, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
  In-Reply-To: <5294FC63.2090401@gmx.net>
  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> <CAFj8pRAt_Dp0n0yecmpiPyYeMHT8mcaPNe+UsLoGgd20ZXKY=w@mail.gmail.com> <CAFj8pRBQOC4LZmYenGtpZAS=Vt+YTbc8s1UQXTEtcNmVegOv5g@mail.gmail.com> <CAEZATCXCOZDREmkjZtu4x5xFZ7rSZB_WtTBSaUH2fm8ocoqCKw@mail.gmail.com> <CA+Tgmoa4g3To_K+K-6oinXzpZHTGttkFC1kwopink90+umHUQQ@mail.gmail.com> <CAFj8pRBtY8ayyVYKLhSFJHL68-QdDJxFAFQ_Cm7H+3AN663RnQ@mail.gmail.com> <528E85B9.2070200@gmx.net> <CAFj8pRBg8i6HP6Uv_sPOihzS7Xy6DdgfFOnbLThys46v3gtgFg@mail.gmail.com> <5294FC63.2090401@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox