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 1uArkD-0039Ne-Ue for pgsql-hackers@arkaria.postgresql.org; Fri, 02 May 2025 14:52:06 +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 1uArkB-009Pua-P7 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 May 2025 14:52:04 +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 1uArkA-009PuR-BD for pgsql-hackers@lists.postgresql.org; Fri, 02 May 2025 14:52:04 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uArk8-000idZ-1J for pgsql-hackers@lists.postgresql.org; Fri, 02 May 2025 14:52:02 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 26B271380EB4; Fri, 2 May 2025 10:51:58 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 02 May 2025 10:51:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=fm2; t=1746197518; x=1746283918; bh=69Psb4iKdBb4xh0K2B9933GHdZxQnt/d f034Q0+5r1U=; b=A6gI3b76Hufh4sbWTyEj5pyIWvBzubyIbQGOH9b4GiQFcru0 NjnbejV/sv/rUgguKN2aspXTQLABNtWRdmYK7XtLsImR6KjXaLV6H+1tBA4Arr/V rqjcogWvphOnWsnZUlShFbepBiy8Y2QX7C8ZI06JLKLnGNIcb5dCWplxo56TaDhm itS161umnS74M7hVwfqqII3NEPr4DPq+IwF+s0GMvgZZT/vfFn6uqIKSr5ngKkgj WMAEJSPPV6SSLoT2OVYnssGSX8Wjy+ctONFAjGoZL5XaxF5Tjsb6zqKrmlYutsMZ D2QRuoAFc0L3FouE4s1gxK7pMVPo2tTiY58HlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm3; t=1746197518; x= 1746283918; bh=69Psb4iKdBb4xh0K2B9933GHdZxQnt/df034Q0+5r1U=; b=a XLODXHYQuPQGZ/phTqQmuqAUxtQailWi9d4ftDFQdoP7V+9y/l0Jc5OSGy8wwgcl +jLlEVkv/IVvAwwzxIZ+nrLNbYWl5iqHSIs8EPSsSJN9zEdmER61WRy1C6eiQ1gw kooslQsX7woiZA814cjELYINMe8Wr+aJii14x/qmSoKnuz1f/2FgeiBOHkCGjcoA SkII31WVLx53CkXuAkIlOQYHc0ym0jPd4Y6Oni6kcRqluZX2CPopR8doUyhZoADx MHSbvJ5e3CZkHS/7inw7qNXupxQSn62cCsRFeoMacQvhROQ6NSih03a+/Z5BjZ/d +tgVamehvLdQpGNzOW3Rg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvjedvjeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddt vdejnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvih hsvghnthhrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepjefhveehtdetgfffhffh feefgffghffflefgieeuueekhedvhedvfeehffdvfeeunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhht rdhorhhgpdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopehmrghthhgvuhhsshhsihhlvheljeesghhmrghilhdrtghomhdprhgtphhtthhopegu rghvihgusehjuhhsthgrthhhvghorhihrdgtohhmpdhrtghpthhtohepmhihohhnseguvg gsihgrnhdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 May 2025 10:51:56 -0400 (EDT) Message-ID: <1405b3ce-8e16-46de-aa9c-0bddac87e479@eisentraut.org> Date: Fri, 2 May 2025 16:51:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: extension_control_path and "directory" To: Matheus Alcantara , "David E. Wheeler" Cc: Christoph Berg , pgsql-hackers@lists.postgresql.org References: <3C304C9E-976C-4FB9-A883-707E0B90756A@justatheory.com> <546E7C54-D2F4-4DBB-9A06-EBBF90265A2C@justatheory.com> <672C8C5E-519A-4B39-9421-E6C31917B271@justatheory.com> Content-Language: de-DE From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 29.04.25 17:06, Matheus Alcantara wrote: > On Tue, Apr 29, 2025 at 11:08 AM David E. Wheeler wrote: >> Right. My point is a minor one, but I thin you can use an if/ else there: >> >> ```c >> if (strcmp(piece, "$system") == 0) { >> /* Substitute the path macro if needed */ >> mangled = substitute_path_macro(piece, "$system", system_dir); >> } else { >> /* >> * Append "extension" suffix in case is a custom extension >> * control path. >> */ >> mangled = psprintf("%s/extension", mangled); >> } >> ``` >> > > The substitute_path_macro() already handles the if/else on "piece" but I > think that this if/else version looks nicer. Fixed. > > I've also included some documentation changes for this v5 version to > remove the "extension" from the examples and also mention the scenario > when using the "directory" on the .control file. Thanks, I have committed this. I did a bit of code reformatting and adjusted the documentation a bit. It's good to get this in before beta1 so that we don't have to change the valid values of extension_control_path past beta1.