mirror of
https://github.com/postgres/postgres.git
synced 2025-07-21 16:02:15 +03:00
doc: Flesh out extension 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. Author: David E. Wheeler <david@justatheory.com> Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com> Reviewed-by: Christoph Berg <myon@debian.org> Discussion: https://www.postgresql.org/message-id/6B5BF07B-8A21-48E3-858C-1DC22F3A28B4@justatheory.com
This commit is contained in:
@ -1809,10 +1809,36 @@ include $(PGXS)
|
|||||||
setting <varname>PG_CONFIG</varname> to point to its
|
setting <varname>PG_CONFIG</varname> to point to its
|
||||||
<command>pg_config</command> program, either within the makefile
|
<command>pg_config</command> program, either within the makefile
|
||||||
or on the <literal>make</literal> command line.
|
or on the <literal>make</literal> command line.
|
||||||
You can also select a separate installation directory for your extension
|
</para>
|
||||||
by setting the <literal>make</literal> variable <varname>prefix</varname>
|
|
||||||
on the <literal>make</literal> command line. (But this will then require
|
<para>
|
||||||
additional setup to get the server to find the extension there.)
|
You can select a separate directory prefix in which to install your
|
||||||
|
extension's files, by setting the <command>make</command> variable
|
||||||
|
<varname>prefix</varname> when executing <literal>make install</literal>
|
||||||
|
like so:
|
||||||
|
<programlisting>
|
||||||
|
make install prefix=/usr/local/postgresql
|
||||||
|
</programlisting>
|
||||||
|
This will install the extension control and SQL files into
|
||||||
|
<filename>/usr/local/postgresql/share</filename> and the shared modules into
|
||||||
|
<filename>/usr/local/postgresql/lib</filename>. If the prefix does not
|
||||||
|
include the strings <literal>postgres</literal> or
|
||||||
|
<literal>pgsql</literal>, such as
|
||||||
|
<programlisting>
|
||||||
|
make install prefix=/usr/local/extras
|
||||||
|
</programlisting>
|
||||||
|
then <literal>postgresql</literal> will be appended to the directory
|
||||||
|
names, installing the control and SQL files into
|
||||||
|
<filename>/usr/local/extras/share/postgresql/extension</filename> and the
|
||||||
|
shared modules into <filename>/usr/local/extras/lib/postgresql</filename>.
|
||||||
|
Either way, you'll need to set <xref
|
||||||
|
linkend="guc-extension-control-path"/> and <xref
|
||||||
|
linkend="guc-dynamic-library-path"/> to enable the
|
||||||
|
<productname>PostgreSQL</productname> server to find the files:
|
||||||
|
<programlisting>
|
||||||
|
extension_control_path = '/usr/local/extras/share/postgresql/extension:$system'
|
||||||
|
dynamic_library_path = '/usr/local/extras/lib/postgresql:$libdir'
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Reference in New Issue
Block a user