Re: creating extension including dependencies

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: creating extension including dependencies
Дата
Msg-id CAB7nPqS4QV6Kya1AAgMFHqEtYjjfCC7rx6M-rzW_OrT_AfsrJg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: creating extension including dependencies  (Petr Jelinek <petr@2ndquadrant.com>)
Ответы Re: creating extension including dependencies  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Sep 8, 2015 at 6:14 AM, Petr Jelinek wrote:
> Attached patch uses just boolean in cascade DefElem and splits the
> CreateExtension into two functions, the cascade code now calls the
> CreateExtensionInternal. One thing though - I am passing the DefElems
> directly to the cascaded CreateExtensionStmt options, I think it's not
> problem but want to give it extra visibility.
>
> Also the schema check was moved.

OK, passing the list of extensions through the new routine is indeed a
cleaner approach. One point of detail is that instead of doing this
part:
+       /* Handle the CASCADE option. */
+       if (d_cascade)
+               cascade = defGetBoolean(d_cascade);
+       else
+               cascade = false;
You may as well just initialize cascade to false at the beginning of
the routine and update it only if d_cascade is defined.

Attached are as well changes for the documentation that I spotted in
earlier reviews but were not included in the last version sent by Petr
yesterday. Feel free to discard them if you think they are not
adapted, the patch attached applies on top of Petr's patch.
Regards,
--
Michael

Вложения

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: One question about security label command
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: creating extension including dependencies