Re: Chatter on DROP SOMETHING IF EXISTS

From: David Fetter <david(at)fetter(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Chatter on DROP SOMETHING IF EXISTS
Date: 2007-02-07 18:53:34
Message-ID: 20070207185334.GA8836@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 07, 2007 at 02:13:48PM +0100, Peter Eisentraut wrote:
> What is the practical purpose of the notices emitted by DROP
> SOMETHING IF EXISTS when the object in fact does not exist?

DROP ... IF EXISTS is guaranteed not to throw an error. This lets
people write idempotent scripts which run in a transaction :)

Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-02-07 18:58:11 Re: Modifying and solidifying contrib
Previous Message Tom Lane 2007-02-07 18:44:02 Re: Status of autovacuum and the sporadic stats failures ?