LOAD(7)
π LOAD(7) β the PostgreSQL 15.19 glow-up for shared libraries
okay so bestie, you found a page from the PostgreSQL 15.19 Documentation, manual section 7, and it's literally called LOAD. it's a whole vibe and it's about yeeting a shared library file into the server's brain space. let's get into it π
β¨ NAME β¨
LOAD β load a shared library file π
πΈ SYNOPSIS πΈ
LOAD 'filename'
that's it. that's the whole thing. iconic minimalism.
π¦ DESCRIPTION π¦
okay so picture this: this command loads a shared library file into the PostgreSQL server's address space. literally moving in, unpacking boxes π§³
if the file has already been loaded, the command does nothing. like, zero. nada. it's giving "seen at 3:47pm, no reply" energy. π
here's the part that's highkey important though: shared library files that contain C functions are automatically loaded whenever one of their functions is called. so the server handles that for you, no cap. therefore, an explicit LOAD is usually only needed when you're loading a library that modifies the server's behavior through "hooks" rather than just providing a set of functions. hooks girlies stay needing the manual invite π
so like, how do you write the file name? the library file name is typically given as just a bare file name, and that gets looked up in the server's library search path (which is set by dynamic_library_path). alternatively you can hand over a full path name. either way, you can skip the platform's standard shared library file name extension β she'll figure it out β¨ see Section 38.10.1 for the whole deep dive on this topic, iykyk.
and now the important safety bit, listen up fr fr π¨:
Non-superusers can only applyLOADto library files located in$libdir/plugins/β and the specified filename must begin with exactly that string. like, exactly. no wiggle room. and it is the database administrator's responsibility to ensure that only "safe" libraries are installed there. so if you're the DBA, that's your job, bestie, not the server's. don't come crying later π
π COMPATIBILITY π
LOAD is a PostgreSQL extension. she's not standard SQL, she's built different, and that's on periodt. π
π₯ SEE ALSO π₯
CREATE FUNCTION (CREATE_FUNCTION(7))β the other way to get your functions in there, go read it π«Ά
and that's the whole page! π this masterpiece brought to you by PostgreSQL 15.19, dated 2026. go forth and load responsibly, bestie π β¨π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms