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 1u8OUF-002ylL-5B for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Apr 2025 19:13:24 +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 1u8OUC-00EYzO-Tf for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Apr 2025 19:13:21 +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 1u8OUB-00EYwr-TH for pgsql-hackers@lists.postgresql.org; Fri, 25 Apr 2025 19:13:21 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u8OU9-001wNi-1L for pgsql-hackers@lists.postgresql.org; Fri, 25 Apr 2025 19:13:19 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 6FDAF1380423; Fri, 25 Apr 2025 15:13:15 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 25 Apr 2025 15:13:15 -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=1745608395; x= 1745694795; bh=gBl1RaW/Sn2m+ZSJo6weO5cqyiHAZpE0PsvM4XTYsrU=; b=f OEW6KBXC+lCpezLxLZORrkNE4n7RTWXeHRq5VVLDRP9jnUboXqqjHHkGmEi8frxG adttdDTFJLHp06FP/oEGgGXSRNAN4XTSk4fEYOzSNRXXDSC7DNHOYb7EVhN4viPD nmFFNRyoHag9XzopocpnvgGzF6TzxujTjPoRE2shcNic62Okt5VLvtXkCrhgjv6T 5hjsPZXfzlG+EAvHmhemP44/DHuGjY+oW0T5ygjNbx41SrpMjAeUkwB0iVndt10J BEBi906tjE2HVJJ+aLy9+ccWqIIsc5oh+f1JXR8t+ViQ2CUSvgT8w5wKbUL7TzVw hRwzXGh5gwaax4TRhv5SA== 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= 1745608395; x=1745694795; bh=gBl1RaW/Sn2m+ZSJo6weO5cqyiHAZpE0Psv M4XTYsrU=; b=As1b9EClj838olqYPOIWQgJF8Z83agQvYijSdzAF71urtS5ONrf JVxgxPtL+ZLjOaVFQ2Dp7WvG8ir30XOz978ZGzQty2yv+BolElNNhcgaKw2tojQb Yibpy9hZ+m17ISsV7UaCxHCXqwutx9p5PQjJzEBDSbAw0AAgpgEKHAdIqMc6XEpF iBcvvgvBvNkKXKCDZYxYl5xtT+gMXrCiJ3S/IHYb6CA1ykyKHHcoy8m9DXzdQoW1 ASHexptM/bG4/jmqCAeizH/KbPZxsNBJPcuaDHmbs3znKByMwkOumRANZZfE2jWi uDFjCMOLgj796R9rbsNi4Mc67RSssCvyoDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvheefudehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurheptggguffhjgffvefkfhfvofesghdtmherhhdt jeenucfhrhhomhepfdffrghvihguucfgrdcuhghhvggvlhgvrhdfuceouggrvhhiugesjh hushhtrghthhgvohhrhidrtghomheqnecuggftrfgrthhtvghrnhephffhieeitdefkeev hfehtdfgieehgfffleetjeetkeeitdeugeejgeefffffkeeinecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggrvhhiugesjhhushhtrghthhgv ohhrhidrtghomhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepmhgrthhhvghushhsshhilhhvleejsehgmhgrihhlrdgtohhmpdhrtghpthht ohepmhihohhnseguvggsihgrnhdrohhrghdprhgtphhtthhopehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhs thhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i7c334307:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Apr 2025 15:13:14 -0400 (EDT) Content-Type: multipart/signed; boundary="Apple-Mail=_82F9D052-4BE2-4A8D-99B5-6EAA14B56AAF"; 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: Fri, 25 Apr 2025 15:13:02 -0400 Cc: Christoph Berg , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Message-Id: <672C8C5E-519A-4B39-9421-E6C31917B271@justatheory.com> References: <3C304C9E-976C-4FB9-A883-707E0B90756A@justatheory.com> <546E7C54-D2F4-4DBB-9A06-EBBF90265A2C@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=_82F9D052-4BE2-4A8D-99B5-6EAA14B56AAF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Apr 25, 2025, at 09:25, Matheus Alcantara = wrote: > Yes, you are right. The problem was where I was asserting > control->control_dir !=3D NULL. I've moved the assert after the "if > (!filename)" check that returns an error if the extension was not = found. >=20 > Attached v3 with this fix and also a TAP test for this scenario. That fixes the segfault, thank you. > I'm just a bit confused how you get it working using /extension at the > end of extension_control_path since with this patch this suffix is not > necessary and since we hard coded append this it should return an = error > when trying to search on something like It worked with extension_control_path =3D = '/Users/david/Downloads/share/postgresql/extension:$system=E2=80=99 But not with extension_control_path =3D = '/Users/david/Downloads/share/postgresql:$system=E2=80=99 And here is where the control file actually is: =E2=9D=AF ll ~/Downloads/share/postgresql/extension total 8 -rw-r--r-- 1 david staff 161B Apr 24 18:07 semver.control So I don=E2=80=99t know the answer to your question, but it=E2=80=99d be = handy to have functions that return a list of resolved paths from = extension_control_path and dynamic_library_path, since they get mangled. Best, David --Apple-Mail=_82F9D052-4BE2-4A8D-99B5-6EAA14B56AAF 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+KfmbOQis6ZycGGkt9idPjIgfEFAmgL3r4ACgkQkt9idPjI gfFBxQ/+M5HabgaS04RCAdECGOvA/zi23xQ6858gs1tXHiyn27MPMUjFNrC/hcg/ 8uH1ptK0U9xVUZVTqhq5X2KYGU7PWkkDLLQ2RzrhK00iupZZ0orVhLg8oYxL0TlK sWkz1I8DalRSDqM59kT1oKm6VlK/+gbglqINAEKO3oykRroAVZqCOzd9w96T4hSV TjpkdhjP1fqG6YKbF6A+Ax1qqjRdDaDStmV+fWVpHvCVf1K8ZJG1Dx1A2j7sC6TM GcT4Psye+ABJWTub/gqv9yUbyh3DADafIerxznnrfK1GvFrUlNzaSzsqnU7GwVdO BEWvJ0oG0dGdggF0VPXj4pmRBAZUf17QV/v9jarMiZgxomeaFp3ju9gckQN/hajD bcFdFNEYLQ2sXBJqMjUa26QjvaFobBxMHS1h0PnjpzoHvsbFhB3D+na9BjOteuer vT7OJOsgY34WE3V8Ia8a3d3Gu57gwZUx0fvY0hhAEcMLt/3uOREvDK/mblzthbFV huJqvjoGzMPTGczTd73dszcenS3g0o8R1ipJK4zPLh3Kt4WkCXySeVBOhrSHAUCa CJmo8kdyaE3aXXgevyBH4u3PlGYKHu0CrhOynB/owdiqM5Bm2aD7bsvBF2Ocne0Q k1V4+p9Lkm8qpOT1zKDB4wyeYp0kWluE5ss9VLjiUOgjwPbifSA= =unWE -----END PGP SIGNATURE----- --Apple-Mail=_82F9D052-4BE2-4A8D-99B5-6EAA14B56AAF--