Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Дата
Msg-id 20130727023132.GA8383@toroid.org
обсуждение исходный текст
Ответ на Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Karol Trzcionka <karlikt@gmail.com>)
Ответы Re: Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements  (Fabrízio de Royes Mello<fabrizio@timbira.com.br>)
Список pgsql-hackers
At 2013-07-26 10:39:00 +0200, karlikt@gmail.com wrote:
>
> Hello, as I can see there are more inconsistent places.

Right. This is what I was referring to in my original review. All of the
relevant sites (pre-patch) that currently do:
   if (already exists)       ereport(ERROR …)

should instead be made to do:
   if (already exists)   {       if (ifNotExists)       {           ereport(NOTICE …)           return       }
       ereport(ERROR …)   }

or even (very slightly easier to review):
   if (already exists && ifNotExists)   {       ereport(ERROR …)       return   }
   if (already exists)       ereport(ERROR …)

I don't care much which of the two is used, so long as it's (a) the same
everywhere, and (b) there's no "if (!ifNot" anywhere.

-- Abhijit



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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: Re: [GENERAL] postgres FDW cost estimation options unrecognized in 9.3-beta1
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements