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.94.2) (envelope-from ) id 1tqBYI-000ope-G4 for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 13:46:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tqBYH-00C9KQ-5I for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Mar 2025 13:46:17 +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.94.2) (envelope-from ) id 1tqBYG-00C9IV-CK for pgsql-hackers@lists.postgresql.org; Thu, 06 Mar 2025 13:46:16 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tqBYC-001IyP-0L for pgsql-hackers@postgresql.org; Thu, 06 Mar 2025 13:46:16 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id D8FDC1140221; Thu, 6 Mar 2025 08:46:11 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 06 Mar 2025 08:46:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1741268771; x= 1741355171; bh=QmNyS05gDhEa4L2yCe5BmOJXPTNYWSeONVkeDJOllcE=; b=F uSe9j8/F/XAFBTz5gdp6bO7x79fTF83Xap1axSwLsV7QOHtGZ9k92mi3p2OTUCey DtcBcIozRpY5vpDwCSp6ZAEe4dkEQDNpI070DKNdBt0dUJOEZr0jb+saOnh33edQ IVlart2XbS9eL21ZNv9ukdt+4aZBBPYbvng4YiDtIA+gDQa7MOPvS7HmZZ69PJE5 rgo19/lVj/ElvO69EdWWhu3xr4ZUbKoLI4rR01CBnPsKq3lWypz5K4PoVzBNsUwP oON6dJssR9K4Wyi3h4kxoQVek06VHFnCmZL3IvGsPVl8HA6lGhE7lmvx83E98Hq5 hyVkv/v6YA6bJX619wRng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1741268771; x=1741355171; bh=QmNyS05gDhEa4L2yCe5BmOJXPTNYWSeONVk eDJOllcE=; b=jGFX8K4XhuDU8r5dyQTK7NzqpmH0Spz8ZX1uJLwwz9xfkKA/0R0 bJEY1oF4LjdMpCj0vjG1IC8mDVqqa6gz5isOzNHfRUHqa16Ve7lybhLo+4rlBDV7 +9uiqUEvpdo/Tvl28DD0cRz+V9IfmgL2R5IKXcesZIg2RYcIOQ1as1+Gf97gHZTA gDxw5+SSNH5fk70KPbKlZpPUEOUxoleWBMF5lLiBJj/vfxzW0LC4Fv3puf87MUNL yqkybQ+8y0zKLWYSAy3C9y62Kkwen7cCPMrXiS41GUcF4ZA9StnqDVfRQjmsJVgE QW4xx8mN85U5yBXUtLu7LihgQKVDQ4jiGtg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdejleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurheptgfkffggfgfuvfevfhfhjgesmhdtreertddv jeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghish gvnhhtrhgruhhtrdhorhhgqeenucggtffrrghtthgvrhhnpeektdeutdfhvdfhveeigfff teegvdejvdfhhfevfeevgfdtgfelgeehieevhffgieenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdr ohhrghdpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh epmhgrthhhvghushhsshhilhhvleejsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghn ughrvgifseguuhhnshhlrghnvgdrnhgvthdprhgtphhtthhopehgrggsrhhivghlvgdrsg grrhhtohhlihhnihesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtoheptghr rghighdrrhhinhhgvghrsegvnhhtvghrphhrihhsvggusgdrtghomhdprhgtphhtthhope gurghvihgusehjuhhsthgrthhhvghorhihrdgtohhmpdhrtghpthhtoheprhhosggvrhht mhhhrggrshesghhmrghilhdrtghomhdprhgtphhtthhopegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphho shhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Mar 2025 08:46:09 -0500 (EST) Content-Type: multipart/mixed; boundary="------------LjE456vkXEleC8H0CS0jgMnc" Message-ID: <38c53446-6b65-4222-b76b-351e56f4841c@eisentraut.org> Date: Thu, 6 Mar 2025 14:46:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RFC: Additional Directory for Extensions To: Matheus Alcantara , Andrew Dunstan Cc: Gabriele Bartolini , Craig Ringer , "David E. Wheeler" , Robert Haas , Alvaro Herrera , PostgreSQL-development References: <0d384836-7e6e-4932-af3b-8dad1f6fee43@eisentraut.org> <4f7209ba-1ca2-475e-9a70-0f3fe0be6378@eisentraut.org> <12312928-5516-49b8-81c1-a7b56fd01bc8@dunslane.net> Content-Language: en-US From: Peter Eisentraut In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------LjE456vkXEleC8H0CS0jgMnc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 03.03.25 19:45, Matheus Alcantara wrote: > Hi, attached a new v5 with some minor improvements on TAP tests: > > - Add a proper test name for all test cases > - Add CREATE EXTENSION command execution > - Change the assert on pg_available_extensions and > pg_available_extension_versions to validate the row content > > Also rebased with master This looks very good to me. I have one issue to point out: The logic in get_extension_control_directories() needs to be a little bit more careful to align with the rules in find_in_path(). For example, it should use first_path_var_separator() to get the platform-specific path separator, and probably also substitute_path_macro() and canonicalize_path() etc., to keep everything consistent. (Maybe it would be ok to move the function to dfmgr.c to avoid having to export too many things from there.) Independent of that, attached is a small patch that suggests to use the newer foreach_ptr() macro in some places. --------------LjE456vkXEleC8H0CS0jgMnc Content-Type: text/plain; charset=UTF-8; name="0001-Use-foreach_ptr.patch.nocfbot" Content-Disposition: attachment; filename="0001-Use-foreach_ptr.patch.nocfbot" Content-Transfer-Encoding: base64 RnJvbSAzNWMyMTA2NTU4MDk1ZTc0MzU5Y2VjNThiOTYzMWZhMTllZDkzN2IzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQZXRlciBFaXNlbnRyYXV0IDxwZXRlckBlaXNlbnRy YXV0Lm9yZz4KRGF0ZTogVGh1LCA2IE1hciAyMDI1IDE0OjI4OjA4ICswMTAwClN1YmplY3Q6 IFtQQVRDSF0gVXNlIGZvcmVhY2hfcHRyCgotLS0KIHNyYy9iYWNrZW5kL2NvbW1hbmRzL2V4 dGVuc2lvbi5jIHwgMjAgKysrKysrL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