]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/load.sgml
Upgrade documentation connected with shared_preload_libraries et al.
[postgresql] / doc / src / sgml / ref / load.sgml
1 <!--
2 doc/src/sgml/ref/load.sgml
3 -->
4
5 <refentry id="SQL-LOAD">
6  <indexterm zone="sql-load">
7   <primary>LOAD</primary>
8  </indexterm>
9
10  <refmeta>
11   <refentrytitle>LOAD</refentrytitle>
12   <manvolnum>7</manvolnum>
13   <refmiscinfo>SQL - Language Statements</refmiscinfo>
14  </refmeta>
15
16  <refnamediv>
17   <refname>LOAD</refname>
18   <refpurpose>load a shared library file</refpurpose>
19  </refnamediv>
20
21  <refsynopsisdiv>
22 <synopsis>
23 LOAD '<replaceable class="PARAMETER">filename</replaceable>'
24 </synopsis>
25  </refsynopsisdiv>
26
27  <refsect1 id="sql-load-description">
28   <title>Description</title>
29
30   <para>
31    This command loads a shared library file into the <productname>PostgreSQL</>
32    server's address space.  If the file has been loaded already,
33    the command does nothing.  Shared library files that contain C functions
34    are automatically loaded whenever one of their functions is called.
35    Therefore, an explicit <command>LOAD</> is usually only needed to
36    load a library that modifies the server's behavior through <quote>hooks</>
37    rather than providing a set of functions.
38   </para>
39
40   <para>
41    The library file name is typically given as just a bare file name,
42    which is sought in the server's library search path (set
43    by <xref linkend="guc-dynamic-library-path">).  Alternatively it can be
44    given as a full path name.  In either case the platform's standard shared
45    library file name extension may be omitted.
46    See <xref linkend="xfunc-c-dynload"> for more information on this topic.
47   </para>
48
49   <indexterm>
50    <primary><filename>$libdir/plugins</></primary>
51   </indexterm>
52
53   <para>
54    Non-superusers can only apply <command>LOAD</> to library files
55    located in <filename>$libdir/plugins/</> &mdash; the specified
56    <replaceable class="PARAMETER">filename</replaceable> must begin
57    with exactly that string.  (It is the database administrator's
58    responsibility to ensure that only <quote>safe</> libraries
59    are installed there.)
60   </para>
61  </refsect1>
62
63  <refsect1 id="sql-load-compat">
64   <title>Compatibility</title>
65
66   <para>
67    <command>LOAD</command> is a <productname>PostgreSQL</productname>
68    extension.
69   </para>
70  </refsect1>
71
72
73  <refsect1>
74   <title>See Also</title>
75
76   <para>
77    <xref linkend="sql-createfunction">
78   </para>
79  </refsect1>
80 </refentry>