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

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: psql's default database on connect (our internal ref. SRP-30861)
Дата
Msg-id CAECtzeUzVZ-QUCPC3vQ2maHwb6TU31FKnzeBJKVjS5Qc43JDLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql's default database on connect (our internal ref. SRP-30861)  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
Le ven. 6 août 2021 à 09:51, Matthias Apitz <guru@unixarea.de> 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 --help" without specifying a
> PostgreSQL username and database name, so it used your OS username as both
> of them, hence the "default: testpos" for the database.

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")

This wasn't in your first examples. I agree it's misleading. I guess this happens because psql has no idea which database it will connect to in the end. It isn't its call, but libpq's.

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

Предыдущее
От: Matthias Apitz
Дата:
Сообщение: Re: psql's default database on connect (our internal ref. SRP-30861)
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: psql's default database on connect (our internal ref. SRP-30861)