LOAD(7)

πŸ“¦ version 13.23, in opensuse-leap 16.0

πŸ’… LOAD(7) β€” the PostgreSQL 13.23 glow-up edition ✨

okay so bestie, welcome to LOAD(7) from the PostgreSQL 13.23 docs πŸŽ€ this one's short but she's iconic, let's get into it 🫢


🌸 NAME 🌸

LOAD β€” load a shared library file, no cap πŸ’–


✨ SYNOPSIS ✨

LOAD 'filename'

that's it. that's the whole vibe check. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• β€” this command loads a shared library file straight into the PostgreSQL server's address space. literally just yeets it in there. πŸš€

if the file has already been loaded, the command does nothing. like, doesn't even blink. it's giving "been there, done that, already in memory" πŸ’…

now, shared library files that contain C functions get loaded automatically whenever one of their functions is called β€” the server handles that for you, no manual needed, periodt ✨. therefore, an explicit LOAD is usually only needed when you're loading a library that modifies the server's behavior through "hooks" rather than providing a set of functions. hooks are the main character here, iykyk πŸ‘‘

the library file name is typically given as just a bare file name β€” and that get searched for in the server's library search path, which is set by dynamic_library_path. alternatively, you can hand over a full path name instead. either way works bestie, the server's flexible like that 🌈

and in either case, the platform's standard shared library file name extension may be omitted. fancy, right? for more info on this whole topic, go peek at Section 37.10.1 πŸ“–

🚨 important bestie alert: non-superusers can only apply LOAD to library files located in $libdir/plugins/ β€” meaning the specified filename must begin with exactly that string. no wiggle room. and btw, it is the database administrator's responsibility to ensure that only "safe" libraries are installed there πŸ™ˆ so like, keep an eye on that, fr fr.

πŸ”₯ COMPATIBILITY πŸ”₯

LOAD is a PostgreSQL extension. that's it, that's the whole section πŸ’€ she's a homegrown icon.


πŸ‘€ SEE ALSO πŸ‘€


and that's the page bestie!! πŸ“ slay, you read the whole thing πŸ’–

with love from the PostgreSQL 13.23 docs, dated 2025 β€” mwah πŸ’‹

πŸ“¦ where this page comes from