[NOVICE] Why psql connection assumes default database name as the username

Поиск
Список
Период
Сортировка
От Neha Khatri
Тема [NOVICE] Why psql connection assumes default database name as the username
Дата
Msg-id CAFO0U+8P1PBd7jR3_eiYMsztRFcm59uGBJZL92P_Guag=JPf9g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [NOVICE] Why psql connection assumes default database name asthe username  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-novice
Hi,

For psql connection, the default database name is assumed to be operating system user name. Is it a common practice to have a database name same as an OS username. Or would the applications create a database with the OS username as some default procedure?

Is this assumption made so that the owners of the database can be easily classified based on the database name. Or it is for some other reason.

Without the presence of database with same name as the username, following failure is seen. 
psql: FATAL: database "pgadmin" does not exist

In my specific case the problem is just that the database 'pgadmin' is not there, then why should it be a FATAL error. I understand that any process aborting errors are treated FATAL. But it looks like a simple error here.

It will be good to understand the reason behind default database name assumption.

Regards,
Neha

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

Предыдущее
От: Moreno Andreo
Дата:
Сообщение: Re: [SPAM] [NOVICE] backup task target
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: [NOVICE] Why psql connection assumes default database name asthe username