> But I have some notes: > > 1. There is an odd underscore character in functions > find_in_extension_control_path and list_extension_control_paths: > \"extension_control__path\""
Fixed in the new version of the patch, attached.
> 2. If we have several versions of one extension in different directories > (which are listed in extension_control_path parameter) then we > get strange output from pg_available_extensions and > pg_available_extension_versions views (Information about extension, whose > path is at the beginning of the list, is duplicated). And only one version > of the extension can be created.
Fixed.
> 3. It would be fine to see an extension control path > in pg_available_extensions and pg_available_extension_versions views (in > separate column or within of extension name).
I think the on-disk location is an implementation detail and decided in the attached version not to change those system view definitions.
> 4. Perhaps the CREATE EXTENSION command should be improved to allow > creation of the required version of the extension. > So we can use different versions of extensions in different databases.
Fixed in the attached.
I also fixed ALTER EXTENSION UPDATE to search for udpate scripts in the same directory where the main control file is found, but I suspect this part requires more thinking.
When we ALTER EXTENSION UPDATE we might now have several places where we find extname.control files, with possibly differents default_version properties.
In the attached, we select the directory containing the control file where default_version matches the already installed extension version. That matches with a model where the new version of the extension changes the default_version in an auxiliary file.
We might want to instead match on the default_version in the control file to match with the new version we are asked to upgrade to.
Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support