PostgreSQL allows you to install and use extensions to add additional functionality to the database. Extensions are installed in a specific database, and once installed they can be used like any other database object.  To install an extension, you will need to use the CREATE EXTENSION statement. This statement has the following syntax:  CREATE EXTENSION [ IF NOT EXISTS ] extension_name [ WITH ] [ SCHEMA schema_name ] [ VERSION version ] [ FROM old_version ]  The extension_name is the name of the extension that you want to install. The IF NOT EXISTS clause is optional, and it specifies that the extension should only be installed if it does not already exist in the database.  The WITH clause is optional, and it allows you to specify additional options for the extension. The SCHEMA option allows you to specify the schema in which the extension's objects should be created. The VERSION option allows you to specify the version of the extension that you want to install. The FROM option allows you to specify the version of the extension that you are upgrading from.  For example, to install the my_extension extension in the public schema, you could use the following statement:  CREATE EXTENSION IF NOT EXISTS my_extension WITH SCHEMA public;  To uninstall an extension, you can use the DROP EXTENSION statement. This statement has the following syntax:  DROP EXTENSION [ IF EXISTS ] extension_name [ CASCADE | RESTRICT ]  The extension_name is the name of the extension that you want to uninstall. The IF EXISTS clause is optional, and it specifies that the extension should only be uninstalled if it exists in the database.  The CASCADE and RESTRICT options allow you to specify what should happen to objects that depend on the extension. The CASCADE option will automatically drop any objects that depend on the extension, while the RESTRICT option will prevent the extension from being dropped if there are any dependent objects.  For example, to uninstall the my_extension extension, you could use the following statement:  DROP EXTENSION my_extension CASCADE;  To list all installed extensions in a database, you can use the \\dx command in the psql command-line interface. This will show you the name, schema, and version of each installed extension.  To check the status of an extension, you can query the pg_extension system catalog table. For example, the following query will show you the name, schema, and version of the my_extension extension:  SELECT extname, extnamespace, extversion FROM pg_extension WHERE extname = 'my_extension';  To check for available updates to an extension, you can use the CREATE EXTENSION statement with the VERSION option. For example, the following statement will check for an update to the my_extension extension:  CREATE EXTENSION my_extension WITH VERSION 'latest';  If an update is available, the extension will be upgraded to the latest version. If no update is available, the extension will remain at its current version.