Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJVo8-009M52-0l for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Nov 2025 11:48:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJVo5-0016sY-3C for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Nov 2025 11:48:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJVl8-0012RH-1q for pgsql-hackers@lists.postgresql.org; Thu, 13 Nov 2025 11:45:02 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vJTNT-007VSH-0V for pgsql-hackers@lists.postgresql.org; Thu, 13 Nov 2025 09:12:29 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-7acd9a03ba9so465673b3a.1 for ; Thu, 13 Nov 2025 01:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763025145; x=1763629945; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eanF1YpkcNUSLhWMVRSWb4v3eafrBaMTYlgrjo1SXzg=; b=V9NlGWkOuoGfz0AJWdpkmCeAIf1UOcs0CSX+t+r2DsccOdfbdBtCwitcgVB7WFaExe RQYzUAl69LdxkMjH/+cLjWyYJsuJNNHR6tbwcf+ri057mHuhs1TdG1FPAfn6EpBrfa7t 6ek4V+DA5QIjqXcuU7orXwzzqXbM0ShPIHPMMpzlaCA+3AIPQPURztTl0vQ3Cy0P96vq EcxMzlNvMnFncQVXV0FIFYhW2Oyr0DGjnleUjes5wAfN5KedO9YYWTHyVILJtehs3c73 lg6yCtUk2VvEonDvp+E8IKIOi3ov1f7tFXDI/yzI5DZPeT+fTrkc+t2XlhETr6N/jnYP z8/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763025145; x=1763629945; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eanF1YpkcNUSLhWMVRSWb4v3eafrBaMTYlgrjo1SXzg=; b=Y2inYeKPkwztbCD64ZaQMgikiZVLFeVOXs9QVy9ozmIVHM9i72mgbsLYyCYdvxTv1f UxeflHaw1fLy/FG0Vf2im0o0m98UGGk7wljc876rp3IGgn1JErQ9D853WkpHdysbqtW+ tSlLKAu5MpurHl0lPmyEDWUNtegXn5UyLy94hlA4KI8bbDVdIFQR0toCGSE/aOPzVxUX 9E/Sg1fdkBVbwFNp/43LyB3GnL14B4Be/39iwjhKVnszL5dY6IHiUo5ZNM2z2B0yzBk7 G/HCWqH5SJv47s2i/SALo736cNyDQ1bfych4TNii5cjArDwY1KXMa0g/AES2Eeme3Xx6 y1Vg== X-Forwarded-Encrypted: i=1; AJvYcCXi+wlQAy11SibMZVTR/ibWagPaQ2rpQjuPQrOvffp1c8hqc5F+ny8JQIsTeLY4GjKQ0y2PMem4xm0pAElL@lists.postgresql.org X-Gm-Message-State: AOJu0YykPl0D7LJvEvnCy6W7uIEzopFGWPHjJpxMn5A+bsk6aZHhZzNH ZG9K2tFQlSg8XzGSp2xTi+88S+kZ8cAhjPADq1Gz5Updhnop0oZlgHcy X-Gm-Gg: ASbGnctNFx8Rr84fQKylUfnrzKj206AQNFToQG7bGXq4/kURU7TwfBRH+hvAIh/PW4j 4dKfeRFLQHmkE/Vh4o3GSV3nL49fUbH0QRlCH79iAs8+eBCUiodTMjblSXFu7dSH3uNviCabzLM TCpS6XgX61UDQVsZmimUEsUMuCvV8USh3IMhOG0oPzUfFRJQFOlpO7m8BT1jWDSgKAVHwu+i8Mj N/fPNREG82Tj6DKAR7xG4oE3GnoAoG5xiyFvhEtYlLnKZjt24vdcwJwq81nVlbs41WQ0sFOh2e0 +kn6CqxDpPKUUxGgOlQc2PkpI/YF+E/FrNI+aGAkJenCDvXjadzzOdVN1MK+O3/kEisN2E6feGM VMevUeFME/gXe9Aql5Fg+CEehcZuJxBiO3XkiUjPHc8WYK+OIZ5afDb+haOvNz0yI2/BALRhr2o 92Gk9l7bS5mm8cXQEqe+4N X-Google-Smtp-Source: AGHT+IEiUUIvPyMPDqOYBsvhxl3JmiXwkifevWFxQHqjriIxWKCOALSz1I0hqyDrVsaw/j/NYaQBGQ== X-Received: by 2002:a05:6a21:32a3:b0:34e:975:3bb9 with SMTP id adf61e73a8af0-3590b811caemr8145424637.49.1763025145231; Thu, 13 Nov 2025 01:12:25 -0800 (PST) Received: from smtpclient.apple ([209.127.78.222]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-bc36fa02c42sm1582554a12.16.2025.11.13.01.12.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2025 01:12:24 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: Include extension path on pg_available_extensions From: Chao Li In-Reply-To: Date: Thu, 13 Nov 2025 17:11:44 +0800 Cc: Rohit Prasad , pgsql-hackers@lists.postgresql.org, mbanck@gmx.net Content-Transfer-Encoding: quoted-printable Message-Id: <96F4EB92-C8C3-4E60-A253-E6D789ED79B3@gmail.com> References: <176282677490.2081919.14769189141245328542.pgcf@coridan.postgresql.org> To: Matheus Alcantara X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Matheus, I just reviewed and tested the patch again, got a few more comments: > On Nov 11, 2025, at 20:47, Matheus Alcantara = wrote: >=20 >=20 > On this new v5 version I also swap the order of "comment" and = "location" > columns as it was suggested by Michael. >=20 > -- > Matheus Alcantara > EDB: http://www.enterprisedb.com >=20 > 1 - commit comment ``` User-defined locations are only visible for users that has the pg_read_extension_paths role, otherwise is returned as a column value, the same behaviour that we already have on pg_stat_activity. ``` First, there is a typo: "for users that has=E2=80=9D should be = =E2=80=9Chave=E2=80=9D. Then, Is this still true? The code change shows: ``` + /* We only want to show extension paths for superusers. */ + if (superuser_arg(GetUserId())) + { ``` And the code change says: ``` + GUC. Only superusers can see the contents of this column. ``` But the TAP test contains a case for normal user: ``` +# Create an user to test permissions to read extension locations. +my $user =3D "user01"; +$node->safe_psql('postgres', "CREATE USER $user"); + my $ecp =3D $node->safe_psql('postgres', 'show = extension_control_path;'); =20 is($ecp, "\$system$sep$ext_dir$sep$ext_dir2", @@ -46,28 +54,46 @@ $node->safe_psql('postgres', "CREATE EXTENSION = $ext_name2"); my $ret =3D $node->safe_psql('postgres', "select * from pg_available_extensions where name =3D = '$ext_name'"); is( $ret, - "test_custom_ext_paths|1.0|1.0|Test extension_control_path", + = "test_custom_ext_paths|1.0|1.0|$ext_dir_canonicalized/extension|Test = extension_control_path", "extension is installed correctly on = pg_available_extensions=E2=80=9D); ``` And I tried to run the TAP test, it passed. So I=E2=80=99m really confused here. 2 ``` + else + return ""; +} ``` Why do we just show nothing (empty string)? Every row showing a long = string of just looks not good, that=E2=80=99s a = lot of duplications. ``` evantest=3D> select * from pg_available_extension_versions; name | version | installed | superuser | trusted | = relocatable | schema | requires | location = | comment = --------------------+---------+-----------+-----------+---------+---------= ----+------------+---------------------+--------------------------+-------= ----------------------------------------------------------------- refint | 1.0 | f | t | f | t = | | | | = functions for implementing referential integrity (obsolete) unaccent | 1.1 | f | t | t | t = | | | | = text search dictionary that removes accents ``` Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/