Re: RFC: Additional Directory for Extensions

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: "David E. Wheeler" <david@justatheory.com>, Peter Eisentraut <peter@eisentraut.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>, Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>, Craig Ringer <craig.ringer@enterprisedb.com>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2025-02-04T20:34:36Z
Lists: pgsql-hackers
On 2025-02-03 Mo 3:42 PM, David E. Wheeler wrote:
> Hi Peter,
>
>> prefix= should only be set when running the "install" target, not when building (make all).
> I see. I confirm that works. Still, don’t all the other parameters work when passed to any/all targets? Should this one have an extension-specific name?



IDK, I don't understand what you think you're saying when you specify 
--prefix to an extension build (as opposed to an install).


>
>>> So I suspect the issue is that, when looking for SQL files, the patch needs to use the directory parameter[4] when it’s set --- and it can be an absolute path! Honestly I think there’s a case to be made for eliminating that parameter.
>> Possibly.  I didn't know why extensions would use that parameter, before you showed an example.
> ISTM it does more harm than good. The location of extension files should be highly predictable. I think the search path functionality mitigates the need for this parameter, and it should be dropped.



I agree that we should either drop the "directory" directive or fix this 
patch so it doesn't break it. I have never used the directive, not sure 
I was even aware of its existence, so I have no objection to dropping it.



cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Commits

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

  2. Fix extension control path tests

  3. extension_control_path