Article illustration 1

A One‑Stop Shop for PostgreSQL Extensions on macOS

PostgreSQL’s extensibility is one of its greatest strengths, but on macOS that strength can be hampered by compiler quirks and the absence of certain language runtimes. Postgres.app addresses these pain points by shipping a curated set of popular extensions—such as plpgsql, pg_crypto, and many others—ready to be enabled with a simple CREATE EXTENSION statement.

"All you need to do is enable them with the CREATE EXTENSION command and you are good to go!" – Postgres.app documentation

Built‑in Extensions

The bundled extensions cover the most common use cases:

  • plpgsql – The procedural language that powers most PostgreSQL logic.
  • pg_crypto – Cryptographic functions for hashing, encryption, and more.
  • Other standard extensions – Available via the pg_available_extensions catalog.

Extensions that rely on languages no longer supported by macOS, such as PL/TCL and PL/Perl, are omitted to keep the runtime lean and secure.

Adding Your Own Extensions

When the built‑in set doesn’t cover a niche requirement, Postgres.app offers a straightforward download-and-install workflow. After downloading the installer package, a quick restart of the server and a CREATE EXTENSION command make the new functionality available.

If you need an extension that isn’t on the list, you can compile it yourself. Postgres.app’s design places compiled extensions in ~/Library/Application Support/Postgres/Extensions/<major‑version>/local, ensuring they survive app updates.

# Clone the extension source
git clone [email protected]:theory/pg-envvar.git
cd pg-envvar

# Build it
make

# Install it into the Application Support directory
make install prefix="$HOME/Library/Application Support/Postgres/Extensions/18/local"

Tip: On PostgreSQL 17 or earlier, the prefix flag must be omitted, and you may need to grant Terminal permission to write to the PostgreSQL installation directory.

Version‑Specific Nuances

  • PostgreSQL 18+ – Extensions go into the Application Support folder, automatically added to the search path.
  • PostgreSQL 17 or older – Extensions must be installed in the core PostgreSQL directory; updates require re‑installation.

Because Postgres.app manages the search_path for you, you never have to tweak pg_config or pg_hba.conf manually.

Community‑Driven Growth

The Postgres.app team encourages community contributions: if your favorite extension is missing, file an issue on their GitHub repo. They’ll consider adding it to the official download list.


Source: Postgres.app – Extensions documentation (https://postgresapp.com/extensions/)