Re: creating extension including dependencies

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: creating extension including dependencies
Date: 2015-09-08 02:06:19
Message-ID: CAB7nPqSOSx1nBNLfi0rtfH5kbpWFUU7gJ5htZij70iO2ohvqFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 8, 2015 at 10:44 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> 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.

And /log/ is missing in src/test/modules/extensions/.gitignore.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-09-08 02:44:18 Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?
Previous Message Michael Paquier 2015-09-08 01:44:15 Re: creating extension including dependencies