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

From Matheus Alcantara
Subject Re: extension_control_path and "directory"
Date
Msg-id CAFY6G8dUXHRii5rNy7V8WmBrmBwp9W7y3g+HL6Tn-Lu8KkvK=A@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 Tue, Apr 29, 2025 at 11:08 AM David E. Wheeler <david@justatheory.com> wrote:
> Right. My point is a minor one, but I thin you can use an if/ else there:
>
> ```c
> if (strcmp(piece, "$system") == 0) {
>         /* Substitute the path macro if needed */
>         mangled = substitute_path_macro(piece, "$system", system_dir);
> } else {
>         /*
>         * Append "extension" suffix in case is a custom extension
>         * control path.
>         */
>         mangled = psprintf("%s/extension", mangled);
> }
> ```
>

The substitute_path_macro() already handles the if/else on "piece" but I
think that this if/else version looks nicer. Fixed.

I've also included some documentation changes for this v5 version to
remove the "extension" from the examples and also mention the scenario
when using the "directory" on the .control file.

--
Matheus Alcantara

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ZStandard (with dictionaries) compression support for TOAST compression
Next
From: "David E. Wheeler"
Date:
Subject: Re: extension_control_path and "directory"