postgres.git / summary / log / commit / refs
commit aa7d00fb754b0be820582a799612596167c3e685
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Fri Nov 20 20:47:30 2026 +0000
doc: Fix description of $system in extension_control_path
The documentation specifies that a list element of extension_control_path
that starts with $system gets the system extension directory substituted
for it. However, get_extension_control_directories() only recognizes an
element that is exactly "$system" since commit 81eaaa2c41d.
Any other element, like "$system/foo", is taken as a literal path with
the "extension" suffix appended, so CREATE EXTENSION fails with a "not
an absolute path" error, while pg_available_extensions silently returns
no rows for it.
Expanding $system as a prefix doesn't fit well with the path elements
being base directories to which "extension" is appended, since $system
already points to the extension directory itself. So, rather than
changing the behavior, fix the documentation to say that the element
must be exactly $system.
While at it, clarify that $system is the "extension" subdirectory of
pg_config --sharedir and that the "extension" suffix is not appended
to it.
Backpatch to 18, where the current behavior was introduced.
Author: Matheus Alcantara <mths.dev@pm.me>
Reviewed-by: Mahendrakar Srinivasarao <mahendrakarforpg@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/DMQTNLET8EKG.2BKGGLIOA4OQY@gmail.com
Backpatch-through: 18
doc/src/sgml/config.sgml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 9990f3da135..28440932a73 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -11773,14 +11773,15 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
<para>
The value for <varname>extension_control_path</varname> must be a
list of absolute directory paths separated by colons (or semi-colons
- on Windows). If a list element starts
- with the special string <literal>$system</literal>, the
+ on Windows). If a list element is
+ the special string <literal>$system</literal>, the
compiled-in <productname>PostgreSQL</productname> extension
directory is substituted for <literal>$system</literal>; this
is where the extensions provided by the standard
<productname>PostgreSQL</productname> distribution are installed.
- (Use <literal>pg_config --sharedir</literal> to find out the name of
- this directory.) For example:
+ (This is the <filename>extension</filename> subdirectory of the
+ directory shown by <literal>pg_config --sharedir</literal>.)
+ For example:
<programlisting>
extension_control_path = '/usr/local/share/postgresql:/home/my_project/share:$system'
</programlisting>
@@ -11792,7 +11793,9 @@ extension_control_path = 'C:\tools\postgresql;H:\my_project\share;$system'
subdirectory <filename>extension</filename> which will contain the
<filename>.control</filename> and <filename>.sql</filename> files; the
<filename>extension</filename> suffix is automatically appended to
- each path element.
+ each path element other than <literal>$system</literal>.
+ <literal>$system</literal> cannot be combined with other path
+ components, as in <literal>$system/foo</literal>.
</para>
<para>
[parent: 3802b59db1ff]