Re: Review: extension template - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Review: extension template
Date
Msg-id m2ip0ja5g4.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Review: extension template  (Markus Wanner <markus@bluegap.ch>)
List pgsql-hackers
Markus Wanner <markus@bluegap.ch> writes:
> First of all, I figured that creation of a template of a newer version
> is prohibited in case an extension exists:

Ooops, that's a bug I need to fix.

> I then came to think of the upgrade scripts... what do we link against
> if an extension has been created from some full version and then one or
> more upgrade scripts got applied?
>
> Currently, creation of additional upgrade scripts are not blocked. Which
> is a good thing, IMO. I don't like the block on newer full versions.
> However, the upgrade doesn't seem to change the dependency, so you can
> still delete the update script after the update. Consider this:

We should allow both cases and move the dependency when a script is
installed, and also maintain dependencies in between an upgrade script
and its previous element in the link, either another upgrade script or
the default_full_version you can start with… actually, both.

> I.e. the TO version should probably have a dependency on the FROM
> version (that might even be useful in the template model).

Agreed.

> Another thing that surprised me is the inability to have an upgrade
> script *and* a full version (for the same extension target version).
> Even if that's intended behavior, the error message could be improved:

Will fix too. Thanks for your extended testing!

Josh, if running out of time on this CF, feel free to mark this one as
"returned with feedback": I will still try to make it under the current
commit fest, but with CHAR(13) starting soon and the current state of
the patch it's clearly reasonnable to say it's not ready yet.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: robots.txt on git.postgresql.org
Next
From: Kevin Grittner
Date:
Subject: Re: refresh materialized view concurrently