How to set uuid-ossp as a default extension for whole server? I installed uuid-ossp for the default PostgreSQL database (postgres) using the following sql commands but whenever I create a new database I am forced to run the same commands once again for every new database.
CREATE EXTENSION IF NOT EXISTS &quot;uuid-ossp&quot;;
ALTER EXTENSION &quot;uuid-ossp&quot; SET SCHEMA public;

Is there any way to install uuid-ossp once and ensure that every new database will have uuid-ossp enabled by default?
PS. I use PostgreSQL ver. 13.1
The CREATE DATABASE command always clones some existing template database.
If this parameter is not specified, postgresql uses the template1 database as the default. Thus, any prior changes in template1 database will be part of the new database (unless another TEMPLATE  has been specified explicitly).
You need connect to template1 database and create the uuid-ossp extension in this database.