Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group