Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Tom Lane
Matthias Apitz 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 "

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread hubert depesz lubaczewski
On Fri, Aug 06, 2021 at 08:53:22AM +0200, Matthias Apitz wrote: > What do I uderstand wrong? Please check https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS Specifically: > dbname : The database name. Defaults to be the same as the user name. > In certain con

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Guillaume Lelarge
Le ven. 6 août 2021 à 09:51, Matthias Apitz a écrit : > El día viernes, agosto 06, 2021 a las 09:34:42a. m. +0200, Guillaume > Lelarge escribió: > > > > No, it does not match all my examples. Read again what it says as > > > default on --help. > > > > > > > Actually, it does. You launched "psql -

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Matthias Apitz
El día viernes, agosto 06, 2021 a las 09:34:42a. m. +0200, Guillaume Lelarge escribió: > > No, it does not match all my examples. Read again what it says as > > default on --help. > > > > Actually, it does. You launched "psql --help" without specifying a > PostgreSQL username and database name,

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Guillaume Lelarge
Le ven. 6 août 2021 à 09:25, Matthias Apitz a écrit : > El día viernes, agosto 06, 2021 a las 09:07:56a. m. +0200, Guillaume > Lelarge escribió: > > > Le ven. 6 août 2021 à 08:53, Matthias Apitz a écrit : > > > > > > > > Hello, > > > > > > testpos@srap53dxr1:~> psql --help > > > ... > > > -d

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Matthias Apitz
El día viernes, agosto 06, 2021 a las 09:07:56a. m. +0200, Guillaume Lelarge escribió: > Le ven. 6 août 2021 à 08:53, Matthias Apitz a écrit : > > > > > Hello, > > > > testpos@srap53dxr1:~> psql --help > > ... > > -d, --dbname=DBNAME database name to connect to (default: "testpos") > >

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread David G. Johnston
On Friday, August 6, 2021, Guillaume Lelarge wrote: > If unset, it will use the PostgreSQL user name also as the database name. > This is true, but its not what the docs says: psql usage doc: “The default user name is your operating-system user name, as is the default database name.” Specifyi

Re: psql's default database on connect (our internal ref. SRP-30861)

2021-08-06 Thread Guillaume Lelarge
Le ven. 6 août 2021 à 08:53, Matthias Apitz a écrit : > > Hello, > > testpos@srap53dxr1:~> psql --help > ... > -d, --dbname=DBNAME database name to connect to (default: "testpos") > > testpos@srap53dxr1:~> whoami > testpos > > testpos@srap53dxr1:~> env | grep PG > PGPASSWORD= > P

psql's default database on connect (our internal ref. SRP-30861)

2021-08-05 Thread Matthias Apitz
Hello, testpos@srap53dxr1:~> psql --help ... -d, --dbname=DBNAME database name to connect to (default: "testpos") testpos@srap53dxr1:~> whoami testpos testpos@srap53dxr1:~> env | grep PG PGPASSWORD= PGHOST=localhost PGPORT=5432 testpos@srap53dxr1:~> LANG=C psql -Usisis psql (