Re: creating extension including dependencies

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: creating extension including dependencies
Date: 2015-07-31 01:03:12
Message-ID: CAB7nPqS9MWcAwKHj3y2RUo-ufgLd5MDzR2mt43MrwxiZ+2z4UQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 30, 2015 at 10:58 PM, Petr Jelinek wrote:
> On 2015-07-27 15:18, Michael Paquier wrote:
>> Something also has not been discussed yet: what to do with new_version
>> and old_version (the options of CreateExtensionStmt)? As of now if
>> those options are defined they are not passed down to the parent
>> extensions but shouldn't we raise an error if they are used in
>> combination with CASCADE? In any case, I think that the behavior
>> chosen should be documented.
>>
>
> I don't see why we should raise error, they are used just for the top-level
> extension and I think it makes sense that way. CASCADE documentation says
> SCHEMA option is cascaded to required extensions, do we need to say
> something more than that (ie explicitly saying that the old_version and
> new_version aren't)?

OK, let's do so then. I think that we should still document the fact
that the old and new version strings and not passed to the parent
extensions when cascade is used for clarity. Something like:
"Other options are not recursively applied when the CASCASE clause is used."

I have been through this patch one last time and changed the following:
- Improved documentation: missing markups with <literal>, SCHEMA is a
clause and not a parameter, added explanation that options other than
SCHEMA are not applied recursively with CASCADE
- Corrected .gitignore in test_extensions, log/ was missing.
Those are minor things though, hence I just switched patch as "Ready
for committer".
--
Michael

Attachment Content-Type Size
create-extension-cascade-2015-07-31.patch text/x-patch 22.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2015-07-31 01:17:08 patch: prevent user from setting wal_buffers over 2GB bytes
Previous Message Michael Paquier 2015-07-31 00:35:26 Re: Improving test coverage of extensions with pg_dump