LOAD

|         LOAD          |                       |            |                  |                      |
|:---------------------:|-----------------------|------------|------------------|----------------------|
|[Prev](sql-listen.html)|[Up](sql-commands.html)|SQL Commands|[Home](index.html)| [Next](sql-lock.html)|

---

[]()

## LOAD

LOAD — load a shared library file

## Synopsis

```
LOAD 'filename'

```

## Description

 This command loads a shared library file into the PostgreSQL server's address space. If the file has been loaded already, the command does nothing. Shared library files that contain C functions are automatically loaded whenever one of their functions is called. Therefore, an explicit `LOAD` is usually only needed to load a library that modifies the server's behavior through “hooks” rather than providing a set of functions.

 The library file name is typically given as just a bare file name, which is sought in the server's library search path (set by [dynamic\_library\_path](runtime-config-client.html#GUC-DYNAMIC-LIBRARY-PATH)). Alternatively it can be given as a full path name. In either case the platform's standard shared library file name extension may be omitted. See [Section 38.10.1](xfunc-c.html#XFUNC-C-DYNLOAD) for more information on this topic.

[]()

 Non-superusers can only apply `LOAD` to library files located in `$libdir/plugins/` — the specified *`filename`* must begin with exactly that string. (It is the database administrator's responsibility to ensure that only “safe” libraries are installed there.)

## Compatibility

`LOAD` is a PostgreSQL extension.

## See Also

[CREATE FUNCTION](sql-createfunction.html)

---

|[Prev](sql-listen.html)|[Up](sql-commands.html)| [Next](sql-lock.html)|
|:----------------------|:---------------------:|---------------------:|
|        LISTEN         |  [Home](index.html)   |         LOCK         |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>