pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Hide duplicate names from extension views
Date: Mon, 15 Sep 2025 05:39:26 +0000
Message-ID: <E1uy1vx-000mdH-22@gemulon.postgresql.org> (raw)

Hide duplicate names from extension views

If extensions of equal names were installed in different directories
in the path, the views pg_available_extensions and
pg_available_extension_versions would show all of them, even though
only the first one was actually reachable by CREATE EXTENSION.  To
fix, have those views skip extensions found later in the path if they
have names already found earlier.

Also add a bit of documentation that only the first extension in the
path can be used.

Reported-by: Pierrick <pierrick.chovelon@dalibo.com>
Discussion: https://www.postgresql.org/message-id/flat/8f5a0517-1cb8-4085-ae89-77e7454e27ba%40dalibo.com

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8309f3f86da8103f53193b218cabe4b904550b4a

Modified Files
--------------
doc/src/sgml/config.sgml                           |  6 ++++++
src/backend/commands/extension.c                   | 24 ++++++++++++++++++++++
.../t/001_extension_control_path.pl                |  9 +++++---
3 files changed, 36 insertions(+), 3 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1uy1vx-000mdH-22@gemulon.postgresql.org>
Permalink:  ../E1uy1vx-000mdH-22@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uy1vx-000mdH-22@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Hide duplicate names from extension views
  In-Reply-To: <E1uy1vx-000mdH-22@gemulon.postgresql.org>

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

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