Adding clarification on extension_control_path when extension is present in multiple folders

Started by Pierrickabout 1 year ago2 messagesdocs

Thread notes

1 note#docs
hackorum-bot#docs
hackorum-bot
1 day ago

@global #docs

#docs
Jump to latest
#1Pierrick
pierrick.chovelon@dalibo.com

When playing with the new GUC extension_control_path, I found that the
paths are evaluated one by one
(like search_path)and if an extension is present in multiple paths, only
the on in the first path
will be considered.I think this is totally fine, but I'd like to adda
documentation patch to explain
this (attached file).

What do you think ?

Pierrick,

Here is an example to understand that I can only create extension in
version 2.0.

postgres=# show extension_control_path ;
extension_control_path
-----------------------------------------------------------------------------
 $system:/extensions/meilleureextension/share:/extensions/monextension/share
(1 row)

postgres=# select * from pg_available_extensions where name like '%mon%';
     name     | default_version | installed_version |    comment
--------------+-----------------+-------------------+---------------
 monextension | 2.0             |                   | Meilleure
 monextension | 1.0             |                   | Mon extension
(2 rows)
postgres=# select * from pg_available_extensions where name like '%mon%';
     name     | default_version | installed_version |    comment
--------------+-----------------+-------------------+---------------
 monextension | 2.0             |                   | Meilleure
 monextension | 1.0             |                   | Mon extension
(2 rows)
postgres=# create extension monextension version "1.0" ;
ERROR:  extension "monextension" has no installation script nor update
path for version "1.0"
postgres=# create extension monextension ;
CREATE EXTENSION
postgres=# select * from pg_available_extensions where name like '%mon%';
     name     | default_version | installed_version |    comment
--------------+-----------------+-------------------+---------------
 monextension | 2.0             | 2.0               | Meilleure
 monextension | 1.0             | 2.0               | Mon extension
(2 rows)

Attachments:

t77868_1
0001-Add-clarification-on-extension_control_path.patchtext/x-patch; charset=UTF-8; name=0001-Add-clarification-on-extension_control_path.patchDownload+6-1
#2Matheus Alcantara
matheusssilv97@gmail.com
In reply to: Pierrick (#1)
Re: Adding clarification on extension_control_path when extension is present in multiple folders

On Fri Sep 5, 2025 at 10:53 AM -03, Pierrick wrote:

When playing with the new GUC extension_control_path, I found that the
paths are evaluated one by one
(like search_path)and if an extension is present in multiple paths, only
the on in the first path
will be considered.I think this is totally fine, but I'd like to adda
documentation patch to explain
this (attached file).

What do you think ?

Hi, thanks for working on this!

Just to mention that I have this on my plate, I'm just waiting for a
conclusion on discussion at [1]/messages/by-id/8f5a0517-1cb8-4085-ae89-77e7454e27ba@dalibo.com so that I can make a proper review here.

Thanks!

[1]: /messages/by-id/8f5a0517-1cb8-4085-ae89-77e7454e27ba@dalibo.com

--
Matheus Alcantara