From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias Apitz <guru@unixarea.de>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: psql's default database on connect (our internal ref. SRP-30861)
Date: Fri, 06 Aug 2021 09:50:34 -0400
Message-ID: <2477879.1628257834@sss.pgh.pa.us> (raw)
In-Reply-To: <YQzqGyKS26qthhEv@c720-r368166>
References: <YQzcYh1tAdp72LIZ@c720-r368166>
<CAECtzeXep-aPLgT1hr_QmQv6SyO6W31EE=Z=kMZKJ9J+D=Kt1Q@mail.gmail.com>
<YQzj6YEyfyfJ8t1C@c720-r368166>
<CAECtzeWCnDg9NUpx0j111vS6Z3T=8n9czekPPe3Pn-nUsukDRg@mail.gmail.com>
<YQzqGyKS26qthhEv@c720-r368166>
Matthias Apitz <guru@unixarea.de> writes:
> Sorry, it does not:
> testpos@srap53dxr1:~> psql --help -Usisis | grep DBNAME
> psql [OPTION]... [DBNAME [USERNAME]]
> -d, --dbname=DBNAME database name to connect to (default: "testpos")
While that's certainly confusing, I'm not sure it's wrong.
I'd interpret "default" as meaning "default if you don't specify
something different on the command line". The default username
is reported under similar rules:
$ psql --help -Ufoo | grep user
-U, --username=USERNAME database user name (default: "tgl")
In any case, these choices of default have stood for a very long
time and we're unlikely to consider changing them. If (some parts
of) the docs are inaccurate we should change the docs.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, guru@unixarea.de, guillaume@lelarge.info
Subject: Re: psql's default database on connect (our internal ref. SRP-30861)
In-Reply-To: <2477879.1628257834@sss.pgh.pa.us>
References: <YQzcYh1tAdp72LIZ@c720-r368166> <CAECtzeXep-aPLgT1hr_QmQv6SyO6W31EE=Z=kMZKJ9J+D=Kt1Q@mail.gmail.com> <YQzj6YEyfyfJ8t1C@c720-r368166> <CAECtzeWCnDg9NUpx0j111vS6Z3T=8n9czekPPe3Pn-nUsukDRg@mail.gmail.com> <YQzqGyKS26qthhEv@c720-r368166> <2477879.1628257834@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox