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 1u85Xa-00DGmy-JU for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Apr 2025 22:59:35 +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 1u85XW-004R2p-MH for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Apr 2025 22:59:31 +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 1u85XW-004R2g-AO for pgsql-hackers@lists.postgresql.org; Thu, 24 Apr 2025 22:59:31 +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 1u85XR-001raU-2s for pgsql-hackers@postgresql.org; Thu, 24 Apr 2025 22:59:28 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id C21031140195; Thu, 24 Apr 2025 18:59:24 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 24 Apr 2025 18:59:24 -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=1745535564; x= 1745621964; bh=VgyAlYACaAJ1kehzeG5MX3Pcq37HNj9V2F1g1m2GneE=; b=Q zP9l4gxx04FvrkOil+OE1iKET3ZBbQffTaIK4L3lssCJGcD78IIRcdduZUbTXj3M QWWMpxOBw+xI1eTC/80ZlzB9Jq3bTqTsGb95EfZX5Mrevd1cTC8af7s3J+jlmhKB civudVsgpJ8VmTvDTAeEIkvZR+wxO7lRgoHGR5IvhpiUMzSlSAV8lyisEFqeY665 MwRgZjUoS/TizpFGPy+6KAFoBHB3qAnwjjirexHd2a9x+2TVI8kf+aX5Vcvcqt0e I311YoS249MN5m/vTXfDmmzsHnHUfEkxv49X3YSa7v06ouZud6HkMbGYpc9n0uuE +/f9hqlhr1NPLcIJ00a/A== 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= 1745535564; x=1745621964; bh=VgyAlYACaAJ1kehzeG5MX3Pcq37HNj9V2F1 g1m2GneE=; b=Mfk0qMyFFUh3EaAmnoitAnecJ7DQwO9UNxzk/0yv99hnH+n47+Z eT0bLiE1R8/88PxrP29j9yxcFJPSC+JdOk4fR955woGTk3p1W7flj0rN5OfNhiKX wXSqPcj/E8P4PJ1kKtwxR720bI7ObTbPBIoGdjnv9SUQY4kJ1Vv4R4iImyoS2pcZ doWnUmgQEomzxfBEO3qHGpJ77R9nBGDsDKpHOqK2w9z1UyzH+qOeSYYwJJT8fkUK sPTOMgxFcueGMEgPkg9alCzZYZ37JGMMnJusqOj1jRXzw17KBAaPYUMcAH0iLZUl FV92GzhO71KAQlvRVtZxKHLJLpqkXWBLPoA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvhedtjedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffktgggufffjgevvfhfofesghdtmherhhdt jeenucfhrhhomhepfdffrghvihguucfgrdcuhghhvggvlhgvrhdfuceouggrvhhiugesjh hushhtrghthhgvohhrhidrtghomheqnecuggftrfgrthhtvghrnhepveeivdehtdekueel ieegkeettdegheejhefhueeuvdduieevtdfgtdevhfdtleeknecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggrvhhiugesjhhushhtrghthhgv ohhrhidrtghomhdpnhgspghrtghpthhtohepkedpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhrtghpthhtohepmhgr thhhvghushhsshhilhhvleejsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghnughrvg ifseguuhhnshhlrghnvgdrnhgvthdprhgtphhtthhopehgrggsrhhivghlvgdrsggrrhht ohhlihhnihesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtoheptghrrghigh drrhhinhhgvghrsegvnhhtvghrphhrihhsvggusgdrtghomhdprhgtphhtthhopehrohgs vghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghlvhhhvghrrhgvse grlhhvhhdrnhhoqdhiphdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhs sehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i7c334307:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Apr 2025 18:59:23 -0400 (EDT) From: "David E. Wheeler" Message-Id: <25075595-41F1-4BDA-9390-9E0D983BA909@justatheory.com> Content-Type: multipart/signed; boundary="Apple-Mail=_98C34C54-42AC-4F1F-A6FB-ADEACD5C0397"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\)) Subject: Re: RFC: Additional Directory for Extensions Date: Thu, 24 Apr 2025 18:59:12 -0400 In-Reply-To: <6B5BF07B-8A21-48E3-858C-1DC22F3A28B4@justatheory.com> Cc: Matheus Alcantara , Andrew Dunstan , Gabriele Bartolini , Craig Ringer , Robert Haas , Alvaro Herrera , PostgreSQL-development To: Peter Eisentraut References: <0d384836-7e6e-4932-af3b-8dad1f6fee43@eisentraut.org> <4f7209ba-1ca2-475e-9a70-0f3fe0be6378@eisentraut.org> <12312928-5516-49b8-81c1-a7b56fd01bc8@dunslane.net> <38c53446-6b65-4222-b76b-351e56f4841c@eisentraut.org> <7c178ff3-20a5-493e-a704-e6b3263e782f@eisentraut.org> <28e98657-9369-4539-9e06-9124d1e77853@eisentraut.org> <6B5BF07B-8A21-48E3-858C-1DC22F3A28B4@justatheory.com> 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=_98C34C54-42AC-4F1F-A6FB-ADEACD5C0397 Content-Type: multipart/mixed; boundary="Apple-Mail=_848664FB-FAA3-4615-AE3F-1BA482F524AF" --Apple-Mail=_848664FB-FAA3-4615-AE3F-1BA482F524AF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Mar 19, 2025, at 13:29, David E. Wheeler = wrote: > I think this should at least be documented, but generally feels = unexpected to me. I=E2=80=99ve attached a patch that fleshes out the = docs, along with an example of setting `extension_control_path` and = `dynamic_library_path` to use the locations. It might not have the = information right about the need for =E2=80=9Cpostgresql=E2=80=9D or = =E2=80=9Cpgsql=E2=80=9D in the path. Back in 2003[1] it was just = =E2=80=9Cpostgres=E2=80=9D, but I couldn=E2=80=99t find the logic for it = just now. Here=E2=80=99s a rebase. Best, David --Apple-Mail=_848664FB-FAA3-4615-AE3F-1BA482F524AF Content-Disposition: attachment; filename=v2-0001-Flesh-out-docs-for-the-prefix-make-variable.patch Content-Type: application/octet-stream; name=v2-0001-Flesh-out-docs-for-the-prefix-make-variable.patch; x-unix-mode=0644 Content-Transfer-Encoding: quoted-printable =46rom=20448a03ac53fd145eb5da63c96ac99a99876de642=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20"David=20E.=20Wheeler"=20= =0ADate:=20Thu,=2024=20Apr=202025=2018:57:26=20= -0400=0ASubject:=20[PATCH=20v2]=20Flesh=20out=20docs=20for=20the=20= `prefix`=20make=20variable=0A=0AThe=20variable=20is=20a=20bit=20magical=20= in=20how=20it=20requires=20"postgresql"=20or=20"pgsql"=0Ato=20be=20part=20= of=20the=20path,=20and=20files=20end=20up=20in=20its=20`share`=20and=20= `lib`=0Asubdirectories.=20So=20mention=20all=20that=20and=20show=20an=20= example=20of=20setting=0A`extension_control_path`=20and=20= `dynamic_library_path`=20to=20use=20those=0Alocations.=0A---=0A=20= doc/src/sgml/extend.sgml=20|=2033=20+++++++++++++++++++++++++++++----=0A=20= 1=20file=20changed,=2029=20insertions(+),=204=20deletions(-)=0A=0Adiff=20= --git=20a/doc/src/sgml/extend.sgml=20b/doc/src/sgml/extend.sgml=0Aindex=20= 64f8e133cae..4e75a01fae4=20100644=0A---=20a/doc/src/sgml/extend.sgml=0A= +++=20b/doc/src/sgml/extend.sgml=0A@@=20-1809,10=20+1809,35=20@@=20= include=20$(PGXS)=0A=20=20=20=20=20setting=20= PG_CONFIG=20to=20point=20to=20its=0A=20=20=20=20=20= pg_config=20program,=20either=20within=20the=20= makefile=0A=20=20=20=20=20or=20on=20the=20make=20= command=20line.=0A-=20=20=20=20You=20can=20also=20select=20a=20separate=20= installation=20directory=20for=20your=20extension=0A-=20=20=20=20by=20= setting=20the=20make=20variable=20= prefix=0A-=20=20=20=20on=20the=20= make=20command=20line.=20=20(But=20this=20will=20then=20= require=0A-=20=20=20=20additional=20setup=20to=20get=20the=20server=20to=20= find=20the=20extension=20there.)=0A+=20=20=20=0A+=0A+=20=20=20= =0A+=20=20=20=20You=20can=20also=20select=20a=20separate=20= directory=20prefix=20in=20which=20to=20install=20your=0A+=20=20=20=20= extension's=20files=20by=20setting=20the=20make=20= variable=0A+=20=20=20=20prefix=20when=20executing=20= make=20install=0A+=20=20=20=20like=20so:=0A= +=0A+make=20install=20prefix=3D/etc/postgresql=0A= +=0A+=20=20=20=20This=20will=20install=20the=20control=20= SQL=20files=20into=0A+=20=20=20=20= /etc/postgresql/share=20and=20shared=20modules=20into=0A= +=20=20=20=20/etc/postgresql/lib.=20If=20the=20prefix=20= does=20not=0A+=20=20=20=20include=20the=20strings=20= postgresql=20or=0A+=20=20=20=20= pgsql,=20such=20as:=0A+=0A+make=20= install=20prefix=3D/etc/extras=0A+=0A+=20=20=20=20Then=20= the=20postgresql=20directory=20will=20be=20appended=20= io=20the=0A+=20=20=20=20prefix,=20installing=20the=20control=20SQL=20= files=20into=0A+=20=20=20=20= /etc/extras/postgresql/share=20and=20shared=20modules=20= into=0A+=20=20=20=20/etc/extras/postgresql/lib.=20= Either=20way,=20you'll=20need=20to=0A+=20=20=20=20set=20=20and=20=20to=20allow=0A+=20=20=20=20= PostgreSQL=20to=20find=20the=20files:=0A= +=0A+extension_control_path=20=3D=20= '/etc/extras/postgresql/share/extension:$system'=0A+dynamic_library_path=20= =3D=20'/etc/extras/postgresql/lib:$libdir'=0A+=20=0A=20=20= =20=20=0A=20=0A=20=20=20=20=0A--=20=0A2.48.1=0A=0A= --Apple-Mail=_848664FB-FAA3-4615-AE3F-1BA482F524AF-- --Apple-Mail=_98C34C54-42AC-4F1F-A6FB-ADEACD5C0397 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+KfmbOQis6ZycGGkt9idPjIgfEFAmgKwkAACgkQkt9idPjI gfF02g//X9iX4Kmg7zkN5kKevKMG0b1RZIh47CWe+b7fXvrpwMebecoGIjLUvQj9 mhubbA5UBxdlqf4BOM/9L1w/4CK/u/VcpMLJX3jx44p8L1nbt2c6K5QnJM53vN3E 1mpqlK/biZjpGeKO977F0HFTMAN0OWFa0QUiSbVBWjMB3NXcauHFTXxVwbzJNpTr /6E6uw8MVITLUqO7mgzRwOGJz+mU6Sv2LnjkQhBccs/wifDZ3bHMqp80eIDoPJR8 AJrV8o8/7rsY9De+2RHjX2H8daMPjlrLEQs/Bwv3ChaB1AAfuaT4o4ygM2taFomt 5/ZRADv2fThl67qWBSWUJJkaq7TNbl6gXc53uLozMMEGxN99QbniotoHzJnRV01+ uixYq7GmJNlCTR1L+pb7fkAduVjolzfrjP0e5IqsSIt3GUIcVWvXcpyzUbo2/d3I GUprOXO+sGLpQdxVxWD143lKmDnjMZzcYqXUCIDocpBmyiWqdK0q2IYxB83KaJlO fQvU/Uw0XPg+7Jb3yLz77iCg50xn9WSaw5qZ28ZwJpaoAXMk/ExxHEE2tj5tBalP v1D0JPQUuL+pDbFTnZsprWOBPlUwVTNbFUPmWyCE9EYwda6zQUguXBt8xim7TNnV 2oUfjml3e6rYo5TInXJZkR6TT4cql660WJqnTfbnQNio4uNeY88= =oT3Y -----END PGP SIGNATURE----- --Apple-Mail=_98C34C54-42AC-4F1F-A6FB-ADEACD5C0397--