Re: Chatter on DROP SOMETHING IF EXISTS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Chatter on DROP SOMETHING IF EXISTS
Date: 2007-02-19 14:57:32
Message-ID: 9340.1171897052@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Montag, 19. Februar 2007 13:12 schrieb Alvaro Herrera:
>> I don't understand -- what problem you got with "NO OPERATION"? It
>> seemed a sound idea to me.

> It seems nonorthogonal. What if only some of the tables you mentioned did not
> exist? Do you get "SOME OPERATION"?

I'd say you get DROP TABLE as long as at least one table was dropped.

> There are also other cases where commands don't have an effect but we don't
> explicitly point that out.

The precedent that I'm thinking about is that the command tag for COMMIT
varies depending on what it actually did.

regression=# begin;
BEGIN
regression=# select 1/0;
ERROR: division by zero
regression=# commit;
ROLLBACK
regression=#

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-02-19 15:00:09 Re: New feature request: FlashBack Query
Previous Message Tom Dunstan 2007-02-19 14:51:07 Re: "anyelement2" pseudotype