Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit abae617

Browse files
theoryCommitfest Bot
authored and
Commitfest Bot
committed
Flesh out docs for the prefix make variable
The variable is a bit magical in how it requires "postgresql" or "pgsql" to be part of the path, and files end up in its `share` and `lib` subdirectories. So mention all that and show an example of setting `extension_control_path` and `dynamic_library_path` to use those locations.
1 parent 5941946 commit abae617

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

doc/src/sgml/extend.sgml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,10 +1809,35 @@ include $(PGXS)
18091809
setting <varname>PG_CONFIG</varname> to point to its
18101810
<command>pg_config</command> program, either within the makefile
18111811
or on the <literal>make</literal> command line.
1812-
You can also select a separate installation directory for your extension
1813-
by setting the <literal>make</literal> variable <varname>prefix</varname>
1814-
on the <literal>make</literal> command line. (But this will then require
1815-
additional setup to get the server to find the extension there.)
1812+
</para>
1813+
1814+
<para>
1815+
You can also select a separate directory prefix in which to install your
1816+
extension's files by setting the <literal>make</literal> variable
1817+
<varname>prefix</varname> when executing <literal>make install</literal>
1818+
like so:
1819+
<programlisting>
1820+
make install prefix=/etc/postgresql
1821+
</programlisting>
1822+
This will install the control SQL files into
1823+
<literal>/etc/postgresql/share</literal> and shared modules into
1824+
<literal>/etc/postgresql/lib</literal>. If the prefix does not
1825+
include the strings <literal>postgresql</literal> or
1826+
<literal>pgsql</literal>, such as:
1827+
<programlisting>
1828+
make install prefix=/etc/extras
1829+
</programlisting>
1830+
Then the <literal>postgresql</literal> directory will be appended io the
1831+
prefix, installing the control SQL files into
1832+
<literal>/etc/extras/postgresql/share</literal> and shared modules into
1833+
<literal>/etc/extras/postgresql/lib</literal>. Either way, you'll need to
1834+
set <xref linkend="guc-extension-control-path"/> and <xref
1835+
linkend="guc-dynamic-library-path"/> to allow
1836+
<productname>PostgreSQL</productname> to find the files:
1837+
</programlisting>
1838+
extension_control_path = '/etc/extras/postgresql/share/extension:$system'
1839+
dynamic_library_path = '/etc/extras/postgresql/lib:$libdir'
1840+
</programlisting>
18161841
</para>
18171842

18181843
<para>

0 commit comments

Comments
 (0)