I am not sure if I understood the problem correctly!!!

Can you not use the standard command "DROP TABLE IF EXISTS table1" that PG
provides?

http://www.postgresql.org/docs/8.2/interactive/sql-droptable.html

Or is it that you are on a version of PG where "IF EXISTS" syntax is not
available?

Regards,

--
[EMAIL PROTECTED]
[EMAIL PROTECTED] gmail | hotmail | yahoo }.com

On 2/10/07, Anton Melser <[EMAIL PROTECTED]> wrote:

Hi,
I need to do a "drop table if exists" type thing. I realise I can
easily look in pg_tables, but for testing (if), don't I need to use a
procedural language? In which case, I will need to install it if it
doesn't exist - but I don't know how to test to see whether a language
exists without using a language!
Am I missing something simple here? Is there no way to do this outside
of a function?
Cheers
Antoine

Reply via email to