pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Andres Freund <andres@2ndquadrant.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Satoshi Nagayasu <snaga@uptime.jp>
Cc: Josh Kupershmidt <schmiddy@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Dave Rolsky <autarch@urth.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date: Mon, 14 Oct 2013 17:59:25 -0400
Message-ID: <525C693D.3090105@dunslane.net> (raw)
In-Reply-To: <20131014214421.GE25013@awork2.anarazel.de>
References: <CAK3UJRG__4=+f46XaMiqA80f_-BQhJcpFwyp8g8fpSPqj-JSzA@mail.gmail.com>
	<CAFj8pRBX_+z2XbUSORZA+dv6rk38wvMnM5V8DROGFVrh2ETKjg@mail.gmail.com>
	<CAK3UJRGEmtV477gu8Rvh+TUcRQHQcsHc=c0Ynu=3KDdV+Vxarw@mail.gmail.com>
	<CAFj8pRBmHAh997SKC1W0GFXWbdSdYebV9g1vM5LLGVLvu3MbLw@mail.gmail.com>
	<CAK3UJRHKmhgTfaHu0PuDPr2HEmR3SJCz-1gZJuW19xN8+ZCZZA@mail.gmail.com>
	<CAFj8pRCk-1h_qHd0+u1iGniX4pemmqyYg--0FqEBZ0azf9+F=A@mail.gmail.com>
	<CAFj8pRCLmnA9B2ROnzmwjAjCBq--p-P_2Kq_21N21YX1Kdd8cA@mail.gmail.com>
	<5236B11B.8040700@uptime.jp>
	<CAFj8pRAyO-H5QQJ+853YsO_CZNeNrr7=Z9qjRuC4y5cmWtWyjw@mail.gmail.com>
	<5256DBBF.8010605@dunslane.net>
	<20131014214421.GE25013@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>


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 <snaga@uptime.jp <mailto:snaga@uptime.jp>>
>>>
>>>
>>
>>>     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



view thread (83+ messages)  latest in thread

Message-ID: <525C693D.3090105@dunslane.net>
Permalink:  ../525C693D.3090105@dunslane.net/
Also on:    postgresql.org/message-id/525C693D.3090105@dunslane.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: andrew@dunslane.net, andres@2ndquadrant.com, pavel.stehule@gmail.com, snaga@uptime.jp, schmiddy@gmail.com, tgl@sss.pgh.pa.us, bruce@momjian.us, autarch@urth.org, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
  In-Reply-To: <525C693D.3090105@dunslane.net>
  References: <CAK3UJRG__4=+f46XaMiqA80f_-BQhJcpFwyp8g8fpSPqj-JSzA@mail.gmail.com> <CAFj8pRBX_+z2XbUSORZA+dv6rk38wvMnM5V8DROGFVrh2ETKjg@mail.gmail.com> <CAK3UJRGEmtV477gu8Rvh+TUcRQHQcsHc=c0Ynu=3KDdV+Vxarw@mail.gmail.com> <CAFj8pRBmHAh997SKC1W0GFXWbdSdYebV9g1vM5LLGVLvu3MbLw@mail.gmail.com> <CAK3UJRHKmhgTfaHu0PuDPr2HEmR3SJCz-1gZJuW19xN8+ZCZZA@mail.gmail.com> <CAFj8pRCk-1h_qHd0+u1iGniX4pemmqyYg--0FqEBZ0azf9+F=A@mail.gmail.com> <CAFj8pRCLmnA9B2ROnzmwjAjCBq--p-P_2Kq_21N21YX1Kdd8cA@mail.gmail.com> <5236B11B.8040700@uptime.jp> <CAFj8pRAyO-H5QQJ+853YsO_CZNeNrr7=Z9qjRuC4y5cmWtWyjw@mail.gmail.com> <5256DBBF.8010605@dunslane.net> <20131014214421.GE25013@awork2.anarazel.de> <525C693D.3090105@dunslane.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