Skip site navigation (1) Skip section navigation (2)

Q on requirement to connect to a specific DB

From: <kynn(at)panix(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Q on requirement to connect to a specific DB
Date: 2006-05-14 19:41:01
Message-ID: 200605141941.k4EJf1u03893@panix3.panix.com (view raw or flat)
Thread:
Lists: 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


Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2006-05-15 00:40:57
Subject: Re: Q on requirement to connect to a specific DB
Previous:From: Sean DavisDate: 2006-05-13 01:22:33
Subject: Re: Query Formulation Question

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group