I have a Postgres 9.5 server with 30 databases.

I would like to find out which database uses which extension(s) in one go, preferably in a query that is usable in pgAdmin.

I know that SELECT * FROM pg_extension gives me the extensions for the database I am connected to.

I also know that SELECT * FROM pg_available_extensions lists, well, all available extensions.

I also know that SELECT * FROM pg_database lists all existing databases.


How can I create a list that includes the database name and the extensions used in each database?


1 Answer 1


You connect to each database in turn and query pg_extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.