Q on requirement to connect to a specific DB

Поиск
Список
Период
Сортировка
От
Тема Q on requirement to connect to a specific DB
Дата
Msg-id 200605141941.k4EJf1u03893@panix3.panix.com
обсуждение исходный текст
Ответы Re: Q on requirement to connect to a specific DB  (Sean Davis <sdavis2@mail.nih.gov>)
Re: Q on requirement to connect to a specific DB  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: Query Formulation Question
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Q on requirement to connect to a specific DB