Re: RFC: Additional Directory for Extensions

David E. Wheeler <david@justatheory.com>

From: "David E. Wheeler" <david@justatheory.com>
To: Matheus Alcantara <matheusssilv97@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, Andrew Dunstan <andrew@dunslane.net>, Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>, Craig Ringer <craig.ringer@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-03-21T22:05:34Z
Lists: pgsql-hackers
On Mar 21, 2025, at 17:52, Matheus Alcantara <matheusssilv97@gmail.com> wrote:

> Did you miss to attach the patch?

No. You can see it in the archive[1]. Direct link[2].

> Maybe we could make the "extension" part of the extension control path
> explicitly, like Peter has mentioned in his first patch version [1]?.
> If "directory" is not set we could use "extension" otherwise use the
> "directory" as a path suffix when searching on extension_control_path?

So, omit “extension” from the path options, append it to search for control files, and then append the directory value (if not absolute) if it exists to look for files, and otherwise append “extensions” to find them, too. I think that makes sense.

Essentially it becomes a SHAREDIR search path.

Best,

David


[1]: https://postgr.es/m/6B5BF07B-8A21-48E3-858C-1DC22F3A28B4@justatheory.com
[2]: https://www.postgresql.org/message-id/attachment/174397/v1-0001-Flesh-out-docs-for-the-prefix-make-variable.patch

Commits

  1. doc: Flesh out extension docs for the "prefix" make variable

  2. Fix extension control path tests

  3. extension_control_path