I went through a re-installation of postgresql on a mac using brew and I'm not sure about some default vs user created databases.
After the installation I see 2 users:
postgres
dan
(being my osx user).
These should be ok, normally they are created during installation.
Listing the databases I see:
postgres
(ok, default)template1
(ok, default)dan
(not sure about this)
So my questions are:
what happened to
template0
database? Did I deleted by accident or it's normal that postgres doesn't install it by default all the time? In case I've deleted what can I do to restore it? What's used for?did postgres installed the
dan
databases for storing info on mydan
user or did I create it in the past (and forgot)? In this case I can delete it (it has no tables). How can I be sure who created this?
select * from pg_database;
.\list
from the cli orselect * from pg_database;
I can see it. What's used for?