Re: Why psql connection assumes default database name as the username

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Neha Khatri <nehakhatri5(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Why psql connection assumes default database name as the username
Date: 2017-03-27 08:33:30
Message-ID: 20170327083330.GA23671@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Merlin Moncure 2017-03-27 13:44:07 Re: Extend GIN
Previous Message Neha Khatri 2017-03-26 22:37:44 Re: Why psql connection assumes default database name as the username