Re: Connect without specifying a database?

Поиск
Список
Период
Сортировка
От Christophe
Тема Re: Connect without specifying a database?
Дата
Msg-id 886D8666-7C2B-4102-8140-60EA448C6203@thebuild.com
обсуждение исходный текст
Ответ на Re: Connect without specifying a database?  ("lists@mgreg.com" <lists@mgreg.com>)
Список pgsql-general
On Apr 11, 2009, at 10:15 AM, lists@mgreg.com wrote:
> So, how does needing to connect to a database before querying about
> existing databases make any sense?

Well, you have to connect to the database server, no matter what, in
order to check on the existence of a database (unless you are doing it
by groveling around in the data directories).  The fact that you have
to supply a database as part of that connection seems unremarkable.

Suppose the documentation said something along these lines:

"All connections are to a specific database.  For operations in which
a user-created database would be inappropriate (such as checking for
the existence of a user-created database), the database 'root' is
created by initdb as a known default for such operations."

That would seem to be utterly uncontroversial and normal, yes?

OK s/root/template1/, and you're set. :)

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Connect without specifying a database?
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Connect without specifying a database?