Re: extension_control_path and "directory"

From: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
Cc: Christoph Berg <myon(at)debian(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: extension_control_path and "directory"
Date: 2025-04-29 15:06:51
Message-ID: CAFY6G8dUXHRii5rNy7V8WmBrmBwp9W7y3g+HL6Tn-Lu8KkvK=A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Apr 29, 2025 at 11:08 AM David E. Wheeler <david(at)justatheory(dot)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 Content-Type Size
v5-0001-Make-directory-work-with-extension-control-path.patch application/octet-stream 13.2 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message David E. Wheeler 2025-04-29 15:12:02 Re: extension_control_path and "directory"
Previous Message Bruce Momjian 2025-04-29 14:30:34 pgsql: doc: adjust max_files_per_process again

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2025-04-29 15:12:02 Re: extension_control_path and "directory"
Previous Message Robert Haas 2025-04-29 14:34:42 Re: ZStandard (with dictionaries) compression support for TOAST compression