Re: CREATE IF NOT EXISTS INDEX

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: CREATE IF NOT EXISTS INDEX
Дата
Msg-id CAFcNs+q_jqRnZmLYkB1O6+yF_MB0Z=4C1JKh+3hygXQ8Wh6YYQ@mail.gmail.com
обсуждение исходный текст
Ответ на CREATE IF NOT EXISTS INDEX  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: CREATE IF NOT EXISTS INDEX
Список pgsql-hackers

On Wed, Oct 1, 2014 at 7:57 AM, José Luis Tallón <jltallon@adv-solutions.net> wrote:
>
> [snip]
>
> Please excuse my jumping in, but the EXPECTED syntax is:
>
> CREATE INDEX IF NOT EXISTS .....
>
> whereas your current patch implements:
>
> CREATE [IF NOT EXISTS] INDEX ....
>
>
> if I'm reading the grammar correctly.
>

I think it's not wrong. Look at other CINE that already implemented [1] [2].

But CINE for CREATE TABLE is like your proposal [3] :

CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name ...

So, what's the correct/best grammar?

CREATE [ IF NOT EXISTS ] [ UNIQUE ] INDEX index_name

or

CREATE [ UNIQUE ] INDEX [ IF NOT EXISTS ] index_name


> I guess it would be most interesting to implement this minor change for the next version of the patch. Please do remember to update the documentation accordingly.
>

I will...


> By the way, you also forgot to remove a previous patch implementing "namespace_name<DOT>relation_name" for RLS messages. Maybe a rebase is needed?
>

Sorry... my mistake. Fix attached.

Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: "Value locking" Wiki page
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: pgcrypto: PGP armor headers