public inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Matheus Alcantara <matheusssilv97@gmail.com>
To: Jim Jones <jim.jones@uni-muenster.de>
To: Chao Li <li.evan.chao@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: Avoid leaking system path from pg_available_extensions
Date: Fri, 22 May 2026 12:40:28 -0300
Message-ID: <87c8f8ac-614b-4679-afc7-f591b76c8ff7@gmail.com> (raw)
In-Reply-To: <cf40d36e-e45a-41c2-aea1-7834bcb62da9@uni-muenster.de>
References: <357C774A-ECE9-4455-B641-315205D4D9A1@gmail.com>
	<96203151-6929-4d88-85a0-d552ee258a24@gmail.com>
	<cf40d36e-e45a-41c2-aea1-7834bcb62da9@uni-muenster.de>

On 22/05/26 04:25, Jim Jones wrote:
> On 21/05/2026 17:12, Matheus Alcantara wrote:
>> I've reproduced the issue and the fix looks correct to me.
> 
> same here, +1
> 

Thank you for also testing.

> I was wondering if creating a constant for it would be, stylistically
> speaking, a cleaner solution. For instance:
> 
> #define EXTENSION_SYSTEM_MACRO  "$system"
> 
> I realize that it's used only inside get_extension_control_directories()
> but since it is even mentioned in the docs, I guess it wouldn't be a bad
> idea.
> 

I'm not against it but I don't think that it's necessary since as you 
mention, only get_extension_control_directories() use.

--
Matheus Alcantara
EDB: https://www.enterprisedb.com






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: matheusssilv97@gmail.com, jim.jones@uni-muenster.de, li.evan.chao@gmail.com, andrew@dunslane.net
  Subject: Re: Avoid leaking system path from pg_available_extensions
  In-Reply-To: <87c8f8ac-614b-4679-afc7-f591b76c8ff7@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox