Re: creating extension including dependencies

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, 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-07 21:14:34
Message-ID: 55EDFE3A.8010306@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-09-07 21:28, Petr Jelinek wrote:
> On 2015-09-07 21:09, Alvaro Herrera wrote:
>> Andres Freund wrote:
>>> On 2015-09-07 20:56:50 +0200, Petr Jelinek wrote:
>>>> Yes that sounds cleaner. Just as a side note, List is a Node and
>>>> does have
>>>> copy support (and we pass List as DefElem->arg from gram.y in several
>>>> places).
>>>
>>> I know - but the list element in this case don't have copy support, no?
>>> You seem to have put plain C strings in there, right?
>>
>> Seems slightly easier to use makeString(), no?
>>
>
> Yes, but I think Andres is correct when saying DefElem->arg is not
> nicest place to put it to.
>

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.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
create-extension-cascade-2015-09-07.patch application/x-patch 28.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2015-09-07 21:15:57 Re: PATCH: numeric timestamp in log_line_prefix
Previous Message David G. Johnston 2015-09-07 21:08:48 Re: [patch] Proposal for \rotate in psql