List all available extensions in #Postgres

November 22, 2017|
1 min read
  • sql

Originally posted by me on Hashrocket TIL

Postgres comes packed with extensions just waiting to be enabled!

To see a list of those extensions:

select * from pg_available_extensions;

This will list the extension's name, default_version, installed_version, and the comment which is a one liner description of what the extension does.

Here's an interesting one for example:

name              | earthdistance
default_version   | 1.1
installed_version | ø
comment           | calculate great-circle distances on the surface of the Earth

To enable an extension, simply call create extension on the name:

create extension if not exists earthdistance;

© 2023, Dorian Karter