Re: Test for existence of Table

Поиск
Список
Период
Сортировка
От Gregory Wood
Тема Re: Test for existence of Table
Дата
Msg-id 002501c076c5$35194fa0$7889ffcc@comstock.com
обсуждение исходный текст
Ответ на RE: Test for existence of Table  ("Craig L. Ching" <cching@mqsoftware.com>)
Ответы Re: Test for existence of Table  ("Anthony E . Greene" <agreene@pobox.com>)
Список pgsql-general
> DROP TABLE employees
Error: ERROR:  Relation 'employees' does not exist

And execution halts.... which is I believe why he wanted to check for the
existence before trying to DROP. I'd love to know if this exists as well...
would come in very handy during development time.

Greg

> Yeah,
>
> DROP TABLE employees
> CREATE TABLE employees
>
> ;-)
>
> Craig
>
> -----Original Message-----
> From: Soma Interesting [mailto:dfunct@telus.net]
> Sent: Thursday, January 04, 2001 1:40 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Test for existence of Table
>
>
> 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@telus.net
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump return status..
Следующее
От: Blake Crosby
Дата:
Сообщение: Re: Time Zone Query