Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Pavel Stehule <pavel.stehule@gmail.com>,
Satoshi Nagayasu <snaga@uptime.jp>,
Josh Kupershmidt <schmiddy@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
Bruce Momjian <bruce@momjian.us>, Dave Rolsky <autarch@urth.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2013-10-14T21:44:21Z
Lists: pgsql-bugs, pgsql-hackers
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. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services