postgresql extensions

  • which extensions are loaded in a database?

    echo 'select * from pg_extension;' | psql -U username dbname
  • which extensions are available?

    echo 'select * from pg_available_extensions;' | psql -U username dbname
  • add an extension to a database:

    echo 'create extension pg_stat_statements;' | psql -U username dbname
  • remove an extension from a database:

    echo 'drop extension pg_stat_statements;' | psql -U username dbname