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-000mdF-1w@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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bf5da5d6cae959d8119b4b137ddd9912292b8014

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)

Message-ID: <E1uy1vx-000mdF-1w@gemulon.postgresql.org>
Permalink:  ../E1uy1vx-000mdF-1w@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uy1vx-000mdF-1w@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-000mdF-1w@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