Re: Conditional Statement

Поиск
Список
Период
Сортировка
Искать
От
missive@frontiernet.net (Lee Harr)
Тема
Re: Conditional Statement
Дата
Msg-id
slrna885lg.55.missive@whave.frontiernet.net
Список
Дерево обсуждения
Re: Conditional Statement missive@frontiernet.net (Lee Harr)

> Hello,
> I am trying to write a piece of SQL code, which will first check if a 
> table exist, drop it and then recreate it. I didn't see any 'IF' syntax 
> in pgsql. Is there any other alternative? I tried to use 'case' 
> structure, but didn't succeed.
> Thanks and regards.
> -Samik
> 

Is there reason the table must not exist before you drop it?

When I write SQL scripts (to be fed in to psql) I just go ahead
and drop the table (whether it is really there or not) and if it
does not exist, there is a warning, but the script keeps running.

В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: Changes to NOW() in 7.2?
От: PG
Дата:
Сообщение: Slow in VB Grid with PG
FAQ