Magistrate Postgres Stats for Developers

How to Install a Postgres Extension

2. Is the Extension Available?

select * from pg_available_extensions where name = 'EXTENSION_NAME';

If this query returns one row, the extension is available on your database. If the query returns 0 rows, consult your provider's documentation for installing extensions to the database server.

3. Install the Extension

create extension if not exists EXTENSION_NAME;

After running this query, you should see CREATE EXTENSION as output from the query.

Note

While many extensions have a clear path to installation, more advanced extensions might require additional configuration at the server layer. These extensions usually give a clear error when something is needed and have additional supporting documentation on their site.

Make Your Postgres Database Faster

Sign up for early access and gain insights on slow queries, bloat, and missing/unused indexes.