Test for existence of Table

From: Soma Interesting <dfunct(at)telus(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Test for existence of Table
Date: 2001-01-04 19:39:56
Message-ID: 5.0.0.25.0.20010104113639.02e3d7e8@pop.telus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can I test for an existing table before issuing the "CREATE TABLE" command?

IF EXISTS employees{
DROP TABLE employees
}
CREATE TABLE employees

Can you provide an example of this. I couldn't find this in the manual or
Bruce's book - did I not look hard enough ? :)

- - - - - - -
- - - -
WARNING: Some experts believe that use of any keyboard may cause
serious injury. Consult Users Guide.
dfunct(at)telus(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nelio Alves Pereira Filho 2001-01-04 20:17:08 Inheritance and Foreign Keys
Previous Message Alvaro Herrera 2001-01-04 19:34:33 Re: connecting in shell scripts ??