Re: extension_control_path and "directory" - Mailing list pgsql-hackers

From Matheus Alcantara
Subject Re: extension_control_path and "directory"
Date
Msg-id CAFY6G8c=W8CMFwcx2fA0RSFtvw=5BDGKOjGSV=nEUiZ6use2Bw@mail.gmail.com
Whole thread Raw
In response to Re: extension_control_path and "directory"  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: extension_control_path and "directory"
List pgsql-hackers
On Wed, Apr 23, 2025 at 10:57 AM David E. Wheeler <david@justatheory.com> wrote:
>
> On Apr 23, 2025, at 09:50, Christoph Berg <myon@debian.org> wrote:
>
> > Remembering which path the .control file was found in and from there
> > open the extension "directory" doesn't sound too hard. Why does it
> > have to be more complicated?
>
> This was my question, as well. Do you have a WIP patch to share, Matheus?
>
I spent some time trying to implement this and somehow I got lost in the
changes I thought I would need to make to the "find_in_path" function
and others it calls, but reading these messages and looking at the code
again I think that the change is much simpler than I thought.

Attached is a draft patch that uses the path that the .control file was
found to search for the script files when the "directory" is set on the
.control file.

I've tested with the semver extension and it seems to work fine with
this patch. Can you please check on your side to see if it's also
working?

I still want to make some polish on this patch and also include some
more test cases using the "directory" on the .control file but I think
that is stable to make some tests, make check and check-world is happy.

--
Matheus Alcantara

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Support older Pythons in oauth_server.py
Next
From: Tom Lane
Date:
Subject: Non-reproducible AIO failure