2 doc/src/sgml/ref/load.sgml
5 <refentry id="SQL-LOAD">
7 <refentrytitle>LOAD</refentrytitle>
8 <manvolnum>7</manvolnum>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
13 <refname>LOAD</refname>
14 <refpurpose>load a shared library file</refpurpose>
17 <indexterm zone="sql-load">
18 <primary>LOAD</primary>
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 file name is specified in the same way as for shared library
42 names in <xref linkend="sql-createfunction">; in particular, one
43 can rely on a search path and automatic addition of the system's standard
44 shared library file name extension. See <xref linkend="xfunc-c"> for
45 more information on this topic.
49 <primary><filename>$libdir/plugins</></primary>
53 Non-superusers can only apply <command>LOAD</> to library files
54 located in <filename>$libdir/plugins/</> — the specified
55 <replaceable class="PARAMETER">filename</replaceable> must begin
56 with exactly that string. (It is the database administrator's
57 responsibility to ensure that only <quote>safe</> libraries
62 <refsect1 id="sql-load-compat">
63 <title>Compatibility</title>
66 <command>LOAD</command> is a <productname>PostgreSQL</productname>
73 <title>See Also</title>
76 <xref linkend="sql-createfunction">