Why do we need template0 and template1 on postgresql?

Multi tool use
Why do we need template0 and template1 on postgresql?
I'm a beginner on postgresql. I have faced many difficulties while installing and connecting the database with the pgadmin, I learned a lot of things from the mistakes I do. Now my doubt is why should the l shows the template0 and template1, I searched on the web but unfortunately I didn't find the rightful resources, but I can find that after the removal of both DB(template0 & template1) we cant create a Database.
1 Answer
1
As the name indicates, those are template databases for creating new databases. template1
is the one used by default, and you can alter / add objects there to affect every newly created DB. template0
starts out being the same and should never be changed - to provide a virgin template with original settings.
template1
template0
Their role is described in detail in the chapter "Template Databases" in the manual.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I don't know how you searched for it, this is literally the first and second results in google for "template0".
– eurotrash
Jul 1 at 10:44