Re: Drop temporary table only if it exists - Mailing list pgsql-sql

From Mintoo Lall
Subject Re: Drop temporary table only if it exists
Date
Msg-id 20030214181214.75346.qmail@web14802.mail.yahoo.com
Whole thread Raw
In response to Re: Drop temporary table only if it exists  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
<p>Thanks <p> <b><i>Josh Berkus <josh@agliodbs.com></i></b> wrote: <blockquote style="PADDING-LEFT: 5px;
MARGIN-LEFT:5px; BORDER-LEFT: #1010ff 2px solid">Mintoo,<br /><br />> How do I drop a temporary table ( or for that
mattera sequence) only if it<br />> exists or create them if they donot exist ? I want to do this to avoid any<br
/>>errors<br /><br />A quick check for existance: <br /><br />SELECT * FROM pg_class WHERE relname =
'name_of_temp_table'and relkind = ?<br /><br />You'll want to look in the docs about the PG system tables to see what
<br/>"relkind" you should test on for each type of object.<br /><br />-- <br />Josh Berkus<br />Aglio Database
Solutions<br/>San Francisco</blockquote><p><br /><hr size="1" />Do you Yahoo!?<br /><a
href="http://rd.yahoo.com/O=1/I=brandr/vday03/text/flow/*http://shopping.yahoo.com
/shop?d=browse&id=20146735">Yahoo! Shopping</a> - Send Flowers for Valentine's Day

pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Timezone conversion
Next
From: Brad Hilton
Date:
Subject: sub-query optimization