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
|
| Список | 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 по дате отправления: