drop if exists

From: "Celia McInnis" <celia(at)drmath(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: drop if exists
Date: 2005-05-03 21:06:25
Message-ID: 20050503205238.M86371@drmath.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

What's the easiest way to drop a composite type definition or a table if you
aren't guaranteed that it exists?

I need to do this quite frequently from stored procedures and get booted out
of the stored procedure if I try to DROP something which doesn't currently
exist.

Thanks,
Celia McInnis

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Keith Worthington 2005-05-03 21:21:19 comparison trigger function
Previous Message Tom Lane 2005-05-03 20:43:19 Re: retrieving a previously defined stored procedure from the database?