drop table if exists mytable;

From: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: drop table if exists mytable;
Date: 2007-02-10 14:44:15
Message-ID: 92d3a4950702100644s58379953i2a0d73cd00d8096d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gurjeet Singh 2007-02-10 15:22:28 Re: drop table if exists mytable;
Previous Message Arturo Perez 2007-02-10 13:34:13 Re: Adding TEXT columns tanks performance?