Q on requirement to connect to a specific DB - Mailing list pgsql-novice

From
Subject Q on requirement to connect to a specific DB
Date
Msg-id 200605141941.k4EJf1u03893@panix3.panix.com
Whole thread Raw
Responses Re: Q on requirement to connect to a specific DB
Re: Q on requirement to connect to a specific DB
List pgsql-novice


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


pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: Query Formulation Question
Next
From: Sean Davis
Date:
Subject: Re: Q on requirement to connect to a specific DB