Re: RFC: Additional Directory for Extensions

Peter Eisentraut <peter@eisentraut.org>

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

Attachments

On 03.03.25 19:45, Matheus Alcantara wrote:
> Hi, attached a new v5 with some minor improvements on TAP tests:
> 
> - Add a proper test name for all test cases
> - Add CREATE EXTENSION command execution
> - Change the assert on pg_available_extensions and
>    pg_available_extension_versions to validate the row content
> 
> Also rebased with master

This looks very good to me.  I have one issue to point out:  The logic 
in get_extension_control_directories() needs to be a little bit more 
careful to align with the rules in find_in_path().  For example, it 
should use first_path_var_separator() to get the platform-specific path 
separator, and probably also substitute_path_macro() and 
canonicalize_path() etc., to keep everything consistent.  (Maybe it 
would be ok to move the function to dfmgr.c to avoid having to export 
too many things from there.)

Independent of that, attached is a small patch that suggests to use the 
newer foreach_ptr() macro in some places.

Commits

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

  2. Fix extension control path tests

  3. extension_control_path