Re: extension_control_path and "directory"

Поиск
Список
Период
Сортировка
От Matheus Alcantara
Тема Re: extension_control_path and "directory"
Дата
Msg-id CAFY6G8dDjimxaSQV68ExWMmrAi8xNhiOT3RZOD8oQZmdGCG5Jg@mail.gmail.com
обсуждение исходный текст
Ответ на extension_control_path and "directory"  (Christoph Berg <myon@debian.org>)
Ответы Re: extension_control_path and "directory"
Список pgsql-hackers
On Wed, Apr 23, 2025 at 6:39 AM Christoph Berg <myon@debian.org> wrote:
>
> Re: Peter Eisentraut
> > The new GUC extension_control_path specifies a path to look for
> > extension control files.  The default value is $system, which looks in
> > the compiled-in location, as before.
>
> Is the expectation that this also works for the extension "directory"?
>
> semver is still failing because it's shipping its .sql files in a
> separate directory:
>
> 2025-04-23 09:06:24.864 UTC [422345] myon@contrib_regression ERROR:  could not open directory
"/usr/share/postgresql/18/semver":No such file or directory 
> 2025-04-23 09:06:24.864 UTC [422345] myon@contrib_regression STATEMENT:  CREATE EXTENSION semver;
>
> $ cat debian/postgresql-18-semver/usr/share/postgresql/18/extension/semver.control
> # semver extension
> comment = 'Semantic version data type'
> default_version = '0.40.0'
>
> directory = 'semver'
> module_pathname = '$libdir/semver'
> relocatable = true
>
> $ ls debian/postgresql-18-semver/usr/share/postgresql/18/semver/
> semver--0.10.0--0.11.0.sql  semver--0.17.0--0.20.0.sql  semver--0.30.0--0.31.0.sql  semver--0.32.1--0.40.0.sql
> semver--0.11.0--0.12.0.sql  semver--0.20.0--0.21.0.sql  semver--0.3.0--0.4.0.sql    semver--0.40.0.sql
> semver--0.12.0--0.13.0.sql  semver--0.21.0--0.22.0.sql  semver--0.31.0--0.31.1.sql  semver--0.5.0--0.10.0.sql
> semver--0.13.0--0.15.0.sql  semver--0.2.1--0.2.4.sql    semver--0.31.1--0.31.2.sql  semver.sql
> semver--0.15.0--0.16.0.sql  semver--0.22.0--0.30.0.sql  semver--0.31.2--0.32.0.sql  semver--unpackaged--0.2.1.sql
> semver--0.16.0--0.17.0.sql  semver--0.2.4--0.3.0.sql    semver--0.32.0--0.32.1.sql
>

I've tried to implement some kind of "SHAREDIR search path" as we've
discussed on another thread [1] but it shows out that we need some
considerable refactoring to make it work.

Talking with Peter privately IIUC we concluded that we may document
this limitation that using extension control path with an extension that
uses a custom "directory" field on .control file will not work. I think
that we may add a note section on "extension_control_path" doc on [2],
what do you think?

[1] https://www.postgresql.org/message-id/0F50D989-B82D-4F59-9F13-C08A4673322C%40justatheory.com
[2] https://www.postgresql.org/docs/devel/runtime-config-client.html#GUC-EXTENSION-CONTROL-PATH

--
Matheus Alcantara



В списке pgsql-hackers по дате отправления: