- First, we list all the available extensions:
postgres=# \x onExpanded display is on.postgres=# SELECT *postgres-# FROM pg_available_extensionspostgres-# ORDER BY name;-[ RECORD 1 ]-----+--------------------------------------------------name | adminpackdefault_version | 1.0installed_version |comment | administrative functions for PostgreSQL-[ RECORD 2 ]-----+--------------------------------------------------name | pg_stat statementsdefault_version | 1.5installed_version |comment | track execution statistics of all SQL statements executed(...)
In particular, if the dblink extension is installed, then we see a record like this:
-[ RECORD 10 ]----+--------------------------------------------------name | dblinkdefault_version | ...