PostgreSQL offers various views to figure out which extensions are there on the system and which ones are actually deployed. One of those views is pg_available_extensions:
test=# \d pg_available_extensions View "pg_catalog.pg_available_extensions" Column | Type | Modifiers -------------------+------+----------- name | name | default_version | text | installed_version | text | comment | text |
It contains a list of all extensions available, including their names, their default version, and the version currently installed. To make it easier to the end user, there is also a description available, telling us more about the extension.
The following listing contains two lines taken from pg_available_extensions ...