After the PostgreSQL database server is installed, there are three databases by default. You can view them in the following two ways.
After the PostgreSQL database server is installed, there are three databases by default. You can view them in the following two ways.
1. After the PostgreSQL database server is installed, there are three databases by default. You can view them in the following two ways.
These three databases are all generated by initdb, where template0 and template1 are database templates and can be directly used to clone a new database during creation.
2. Create a method. The default database owner is the user.
Another method for creating a command line is as follows:
3. Create a database for another database role.
Command Line Method:
4. Create a database using a template. Changes to the template will cause identical changes to all database objects created based on the template.