Hi Andrew,

On Feb 4, 2025, at 15:34, Andrew Dunstan <and...@dunslane.net> wrote:

>> 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).

I am unfamiliar with that option. Although `prefix` is mentioned in the PGXS 
docs[1] in the context of other variables, it is not itself documented, neither 
as `prefix=` as Peter suggests, nor as `--prefix`.

At any rate, all the other PGXS variables I’ve used have worked with all the 
make targets, though they obviously don’t necessarily change the behavior of 
all of the targets.

>> 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.

I only just started using it, thinking it keeps things better organized. But 
it’s honestly a bit confusing, in that one must set both the `MODULEDIR` 
variable in the `Makefile` and the `directory` variable in the control file.

Best,

David

[1]: https://www.postgresql.org/docs/current/extend-pgxs.html

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to