Mintoo,
> How do I drop a temporary table ( or for that matter a sequence) only if it
> exists or create them if they donot exist ? I want to do this to avoid any
> errors
A quick check for existance:
SELECT * FROM pg_class WHERE relname = 'name_of_temp_table' and relkind = ?
You'll want to look in the docs about the PG system tables to see what
"relkind" you should test on for each type of object.
--
Josh Berkus
Aglio Database Solutions
San Francisco