LOAD(7)
π LOAD(7) β the PostgreSQL glow-up page β¨
okay bestie, grab your boba because we're talking about LOAD, straight out of the PostgreSQL 14.24 Documentation π
πΈ NAME πΈ
LOAD β load a shared library file, no cap π«Ά
β¨ SYNOPSIS β¨
LOAD 'filename'
that's it. that's the whole vibe. π
π DESCRIPTION π
okay so picture this: LOAD goes and shoves a shared library file directly into the PostgreSQL server's address space. literally just drops it in there. π§
and here's the cute part β if that file has already been loaded, the command justβ¦ does nothing. no error, no drama, no second helping. it's giving "already ate, thanks tho." π
now for the plot twist π₯: shared library files that contain C functions get loaded automatically whenever one of their functions is called. so you don't usually need to be out here typing LOAD manually. an explicit LOAD is normally only needed when you're loading a library that changes the server's behavior through "hooks" instead of just handing you a nice little set of functions. iykyk. πͺ
π the filename situation π
so the library file name is typically given as just a bare file name β no path, no fuss β and the server goes looking for it in its library search path (the one set by dynamic_library_path, mwah π).
alternatively?? you can give it as a full path name. either way, the platform's standard shared library file name extension may be omitted, so you don't have to stress about it. πββοΈ
want the full tea on this topic? See Section 38.10.1. go read it, bestie, it's important. π
π the non-superuser rules π
non-superusers can only apply LOAD to library files located in $libdir/plugins/ β and the specified filename must begin with exactly that string. like, exactly. no sneaky variations. π
and yes, it is the database administrator's responsibility to make sure only "safe" libraries are installed in there. so if something goes sideways, that's a DBA conversation, not a me conversation. π
π COMPATIBILITY π
LOAD is a PostgreSQL extension. periodt. π
π¦ SEE ALSO π¦
CREATE FUNCTION(CREATE_FUNCTION(7)) β go read it, it's the whole friend group
and that's the page, bestie!! π slayed, honestly. this was PostgreSQL 14.24, dated 2026, and you just got the full LOAD(7) experience β mwah, muah, mwah πβ¨π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql14 14.24-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