LOAD

A command for loading a shared library file

LOAD is a utility command for loading a shared library file into the current session.

LOAD has always been present in PostgreSQL.

Usage

A common usage example for LOAD is to import a shared module into the current session, avoiding the impact of enabling it for all sessions via shared_preload_libraries.

Change history

LOAD has never been modified.

Examples

Using LOAD to import the auto_explain module for the current session:

postgres=# LOAD 'auto_explain';
LOAD
postgres=# SET auto_explain.log_min_duration = 0;
SET
postgres=# SELECT count(*)
             FROM pgbench_branches b
             JOIN pgbench_accounts a ON b.bid = a.bid;
 count  
--------
 100000
(1 row)
  • PostgreSQL documentation: LOAD

Categories

SQL command, Utility command

See also

dynamic_library_path, shared_preload_libraries, local_preload_libraries, session_preload_libraries