@@ -1809,10 +1809,35 @@ include $(PGXS)
1809
1809
setting <varname>PG_CONFIG</varname> to point to its
1810
1810
<command>pg_config</command> program, either within the makefile
1811
1811
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>
1816
1841
</para>
1817
1842
1818
1843
<para>
0 commit comments