Re: drop if exists

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: drop if exists
Дата
Msg-id 20051015152003.GD14113@svana.org
обсуждение исходный текст
Ответ на Re: drop if exists  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: drop if exists  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
On Fri, Oct 14, 2005 at 10:32:02PM -0300, Alvaro Herrera wrote:
> What about "CREATE IF NOT EXISTS" (CINE)?  If we support DROP IF EXISTS
> (DIE), is the other one going to be supported too?

CINE already exists sortof, it's called CREATE OR REPLACE. Although the
effect is obvious for functions, it seems to me that it would be cool
to make a CREATE OR REPLACE TABLE that simply does nothing if the table
already exists with the right format.

ISTM that most of the sitautions people are talking about here ivolving
recreating the table exactly as is directly afterwards.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: drop if exists
Следующее
От: Tom Lane
Дата:
Сообщение: Re: slow IN() clause for many cases