Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Date: 2013-11-21 22:14:17
Message-ID: 528E85B9.2070200@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2013-11-21 22:16:31 Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Previous Message Patrick Lademan 2013-11-21 21:06:36 Re: Postgres jobs will not automatically login on Mac OSX

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2013-11-21 22:15:21 Re: information schema parameter_default implementation
Previous Message Peter Eisentraut 2013-11-21 22:03:52 Re: Replication Node Identifiers and crashsafe Apply Progress