2 doc/src/sgml/ref/load.sgml
5 <refentry id="SQL-LOAD">
6 <indexterm zone="sql-load">
7 <primary>LOAD</primary>
11 <refentrytitle>LOAD</refentrytitle>
12 <manvolnum>7</manvolnum>
13 <refmiscinfo>SQL - Language Statements</refmiscinfo>
17 <refname>LOAD</refname>
18 <refpurpose>load a shared library file</refpurpose>
23 LOAD '<replaceable class="PARAMETER">filename</replaceable>'
27 <refsect1 id="sql-load-description">
28 <title>Description</title>
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.
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.
50 <primary><filename>$libdir/plugins</></primary>
54 Non-superusers can only apply <command>LOAD</> to library files
55 located in <filename>$libdir/plugins/</> — 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
63 <refsect1 id="sql-load-compat">
64 <title>Compatibility</title>
67 <command>LOAD</command> is a <productname>PostgreSQL</productname>
74 <title>See Also</title>
77 <xref linkend="sql-createfunction">