As far as I understand, one always has to connect to a specific
database even when what one wants to do does not have anything to do
with any existing database. For example, suppose I just want to
create a new database. As far as I know I must connect to *some*
database, whose role is irrelevant, just so that I can execute "CREATE
DATABASE ..." from that connection.
I find this puzzling from a design perspective. Why involve some
irrelevant DB in the process of creating a new one? Am I
understanding the whole situation correctly? If so, what is the
"canonical" database to connect to? (Is this the purpose of
"template1"?)
Thanks!
kj