]> begriffs open source - ai-pg/blob - full-docs/html/sql-load.html
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / html / sql-load.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>LOAD</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="sql-listen.html" title="LISTEN" /><link rel="next" href="sql-lock.html" title="LOCK" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">LOAD</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="sql-listen.html" title="LISTEN">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="sql-commands.html" title="SQL Commands">Up</a></td><th width="60%" align="center">SQL Commands</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="sql-lock.html" title="LOCK">Next</a></td></tr></table><hr /></div><div class="refentry" id="SQL-LOAD"><div class="titlepage"></div><a id="id-1.9.3.154.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle">LOAD</span></h2><p>LOAD — load a shared library file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
3 LOAD '<em class="replaceable"><code>filename</code></em>'
4 </pre></div><div class="refsect1" id="SQL-LOAD-DESCRIPTION"><h2>Description</h2><p>
5    This command loads a shared library file into the <span class="productname">PostgreSQL</span>
6    server's address space.  If the file has been loaded already,
7    the command does nothing.  Shared library files that contain C functions
8    are automatically loaded whenever one of their functions is called.
9    Therefore, an explicit <code class="command">LOAD</code> is usually only needed to
10    load a library that modifies the server's behavior through <span class="quote">“<span class="quote">hooks</span>”</span>
11    rather than providing a set of functions.
12   </p><p>
13    The library file name is typically given as just a bare file name,
14    which is sought in the server's library search path (set
15    by <a class="xref" href="runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH">dynamic_library_path</a>).  Alternatively it can be
16    given as a full path name.  In either case the platform's standard shared
17    library file name extension may be omitted.
18    See <a class="xref" href="xfunc-c.html#XFUNC-C-DYNLOAD" title="36.10.1. Dynamic Loading">Section 36.10.1</a> for more information on this topic.
19   </p><a id="id-1.9.3.154.5.4" class="indexterm"></a><p>
20    Non-superusers can only apply <code class="command">LOAD</code> to library files
21    located in <code class="filename">$libdir/plugins/</code> — the specified
22    <em class="replaceable"><code>filename</code></em> must begin
23    with exactly that string.  (It is the database administrator's
24    responsibility to ensure that only <span class="quote">“<span class="quote">safe</span>”</span> libraries
25    are installed there.)
26   </p></div><div class="refsect1" id="SQL-LOAD-COMPAT"><h2>Compatibility</h2><p>
27    <code class="command">LOAD</code> is a <span class="productname">PostgreSQL</span>
28    extension.
29   </p></div><div class="refsect1" id="id-1.9.3.154.7"><h2>See Also</h2><p>
30    <a class="xref" href="sql-createfunction.html" title="CREATE FUNCTION"><span class="refentrytitle">CREATE FUNCTION</span></a>
31   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sql-listen.html" title="LISTEN">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="sql-commands.html" title="SQL Commands">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sql-lock.html" title="LOCK">Next</a></td></tr><tr><td width="40%" align="left" valign="top">LISTEN </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> LOCK</td></tr></table></div></body></html>