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 1u9lda-0065pZ-Ga for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Apr 2025 14:08:43 +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 1u9ldX-007ab1-NU for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Apr 2025 14:08:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u9ldX-007aap-Dt for pgsql-hackers@lists.postgresql.org; Tue, 29 Apr 2025 14:08:40 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u9ldW-000Bib-1o for pgsql-hackers@lists.postgresql.org; Tue, 29 Apr 2025 14:08:39 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1C7FD1140223; Tue, 29 Apr 2025 10:08:38 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Tue, 29 Apr 2025 10:08:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=justatheory.com; 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=fm2; t=1745935718; x= 1746022118; bh=/dtK/76cF4t1p2E4lYDpF/qlFnOgMBXzELHO1OqagyQ=; b=0 tFEpOj5rXf4WtpSn8NtBmdSbC4BOa3q0d+iYu0FM+CGzE2dKXYO5kf+GnL0o5FqM 03Q0EwQci/wt1r0pWWMUhEZlXXrMp7KT7qsfflQC4RWqy52vfyXviBIYutAy041o RT/+VzqCOhqojSQso7LhyLykB9vrDilYG9NlXIx5h1m2Tatp4HZQrKo+rBm4Yi12 FHTdGsr/bPmzq55hWZq6+jnLnOaKKP6CzQv1ydMJIjp04Nn9RuiAse0ZT5NrgRgO CmmTLkc3Qri4dHhxu+tPd4e8vy4q7r1MtmqobTuLD7LmRhGSfqkRH/DoW4USmPq9 oBVQKTUtIiu0+vsH0YspQ== 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=fm3; t= 1745935718; x=1746022118; bh=/dtK/76cF4t1p2E4lYDpF/qlFnOgMBXzELH O1OqagyQ=; b=t0mwX45CPWr7YnzDfp/Nhz2f9/uM8wZSPHPA2v6M5p44DF23ZnO xt/yj3WnG3VSjlktu14dnIiqOYURu/BYF9OOj5od8422ipDM6lILZmkbxckYCp43 W3Y6CPA7Od83xu9DOwONCD/Ik8GQjrol1zR6gZOtDXdDfxn0cFmdtKDWtjc/Dt1I vem0DbtEooOmcq5pyWwWwwR8ipZ4J+zF5eRBf3SD7qHBUZTFsNafp7hE3pdMC0wZ frtSJ1LdnsZhuUxK4YAH5YcsA15qF26FOdU2MvVpHjomOaAtByRMkaohIaB9rIFm veXOJzq6xzP4q4QBBy89SJRqQDbcgPXtLlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieegtddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurheptggguffhjgffvefkfhfvofesghdtmherhhdt vdenucfhrhhomhepfdffrghvihguucfgrdcuhghhvggvlhgvrhdfuceouggrvhhiugesjh hushhtrghthhgvohhrhidrtghomheqnecuggftrfgrthhtvghrnhepkeffvdefkeekleek veeggefhudeiheelheethfeivedvffekveetueetjeefveeinecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggrvhhiugesjhhushhtrghthhgv ohhrhidrtghomhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepmhgrthhhvghushhsshhilhhvleejsehgmhgrihhlrdgtohhmpdhrtghpthht ohepmhihohhnseguvggsihgrnhdrohhrghdprhgtphhtthhopehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhs thhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i7c334307:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Apr 2025 10:08:37 -0400 (EDT) Content-Type: multipart/signed; boundary="Apple-Mail=_7874ADDB-CD8B-478F-B815-AB4F225FBDEA"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Re: extension_control_path and "directory" From: "David E. Wheeler" In-Reply-To: Date: Tue, 29 Apr 2025 10:08:26 -0400 Cc: Christoph Berg , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Message-Id: References: <3C304C9E-976C-4FB9-A883-707E0B90756A@justatheory.com> <546E7C54-D2F4-4DBB-9A06-EBBF90265A2C@justatheory.com> <672C8C5E-519A-4B39-9421-E6C31917B271@justatheory.com> To: Matheus Alcantara X-Mailer: Apple Mail (2.3826.500.181.1.5) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_7874ADDB-CD8B-478F-B815-AB4F225FBDEA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 29, 2025, at 09:49, Matheus Alcantara = wrote: > Yes, it is a single path from the search path, in your case it will be > "/Users/david/Downloads/share/postgresql" and "$system". We split = these > paths based on the system path separator and get the next "piece" = here: >=20 > char *piece =3D first_path_var_separator(ecp); >=20 > The first_path_var_separator() changes the "ecp" parameter on every = call, > it returns the next path on "ecp" and changes it to have the remaining > paths to iterate over it. Right. My point is a minor one, but I thin you can use an if/ else = there: ```c if (strcmp(piece, "$system") =3D=3D 0) { /* Substitute the path macro if needed */ mangled =3D substitute_path_macro(piece, "$system", system_dir); } else { /* * Append "extension" suffix in case is a custom extension * control path. */ mangled =3D psprintf("%s/extension", mangled); } ``` Best, David --Apple-Mail=_7874ADDB-CD8B-478F-B815-AB4F225FBDEA Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEd+KfmbOQis6ZycGGkt9idPjIgfEFAmgQ3VoACgkQkt9idPjI gfHw2Q/+PiH8ZwX6fMPzca0ydnWW+TcZ4TiozEBi+I1BNnbBZwnNrYFMDQkNOUnb uEs6gTIpEI3XdZqbhN/cqspPAo2y+lBeYI+XVwW1dLABump8yRMq2WpB5Mb1YUW+ hCFXkBoFUbEe1Y6F44UGdeanmt435FMCQtYSOFJ29BSIjTQSWUBe/ZBZORdHq27S tZB+4rYmpj0sGQOaLd6OgPicIT7OhnvC1WHwLaL+8+gCQQ5Mh+KHGEUif2miXVf5 b3EfhKeZV3fCkCZxvU5zuqeYWneDNUXaiz0zJ9FocWl13ps/G+bDRi+2u1m28Cp+ Il+213AzP9yWWFsYAvYpPAdXdcu5vbzgqKkO4T4uxsoZ5KygVroswTNUAAIljOrh kUoQ0jk4nKCQ1clM1UnK0tUpZ00YwzvWBdj9ql296/2EYEOcT7f5gVU6gawl1iI6 Tdb/YOWFVHpNURysaHICuwZfR9kmnNo5k7g28BOQa1ycEOVeYBpfd0ZkLevKUlWG AYZ0ZOkBRevr/uzcGHnfyIgDuEFNbLTGAUJwV3Vr1ZnjAeTPaJAlSbdjWhDSmhUP tFOk26UDAmIW9xoozpxMZplfc+DazE6b5kYdKw5kJN/SQL913TV1oXr53zRA0e8q a2sMjttGF0Am5j5+bWtMDu0x3RrCV9gHp59zFZrMJB3iuLAhcko= =nEXa -----END PGP SIGNATURE----- --Apple-Mail=_7874ADDB-CD8B-478F-B815-AB4F225FBDEA--