Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Pavel Stehule <pavel.stehule@gmail.com>,
Robert Haas <robertmhaas@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
Andres Freund <andres@2ndquadrant.com>, Tomas Vondra <tv@fuzzy.cz>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-11-21T22:14:17Z
Lists: pgsql-bugs, pgsql-hackers
On 11/21/13, 2:35 AM, Pavel Stehule wrote: > I am feeling, so almost all people prefer > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > Can we live with it? Fine with me. I think it helps if you consider IF EXISTS an attribute of the command, not an attribute of the command parameters. Now we should be aware that this sort of sets a precedent for ALTER TABLE IF EXISTS ... DROP ANYTHING ... and similar composite commands. If might be worth checking other SQL databases. We stole the IF EXISTS from somewhere, I believe.