Re: Why psql connection assumes default database name asthe username - Mailing list pgsql-novice

From hubert depesz lubaczewski
Subject Re: Why psql connection assumes default database name asthe username
Date
Msg-id 20170327083330.GA23671@depesz.com
Whole thread Raw
In response to Re: Why psql connection assumes default database name as the username  (Neha Khatri <nehakhatri5@gmail.com>)
Responses Re: Why psql connection assumes default database name as the username  (jesusthefrog <jesusthefrog@gmail.com>)
List pgsql-novice
On Mon, Mar 27, 2017 at 09:37:44AM +1100, Neha Khatri wrote:
> > Sorry, but I don't agree.
> > I use databases named like users all the time, and love the fact that
> > I don't have to provide dbname when it's obvious.
> So, is it common practice to have a database name same as the username.
> What are the usecase advantages of the database name and username mapping?
> It would be good to understand.

Why wouldn't I use the name of user?

I can have multiple users on a servers that want to "play" with
database, so using db name the same as user name makes it trivial to use
and figure out who is using which db.

Best regards,

depesz



pgsql-novice by date:

Previous
From: Neha Khatri
Date:
Subject: Re: Why psql connection assumes default database name as the username
Next
From: Merlin Moncure
Date:
Subject: Re: Extend GIN