Re: PGUSER and initdb

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: PGUSER and initdb
Дата
Msg-id 55978da3-00e4-a5c8-8ee0-a16a1070a836@aklaver.com
обсуждение исходный текст
Ответ на Re: PGUSER and initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 12/11/19 9:06 AM, Tom Lane wrote:
> Adrian Klaver <adrian.klaver@aklaver.com> writes:
>> On 12/11/19 5:18 AM, Олег Самойлов wrote:
>> This utility, like most other PostgreSQL utilities, also uses the environment variables supported by libpq (see
Section33.14).
 
>> https://www.postgresql.org/docs/12/libpq-envars.html
>> PGUSER behaves the same as the user connection parameter.
>>> This is don't work with `initdb` and `pg_ctl initdb`.
> 
> This seems like nonsense to me.  The initdb documentation says perfectly
> clearly that the initial superuser's name is set by -U.  It does not
> say anything about PGUSER.  I think the reference to libpq in the docs
> probably should be taken out, because initdb never uses libpq to make
> a connection, so libpq's defaults are not relevant.

I am not seeing it as nonsense. The OP made a valid observation, PGUSER 
is not used by the program even though the docs say it should be. If 
what you say about is libpq is also valid for the other programs listed 
here:

https://www.postgresql.org/docs/12/reference-server.html

then the docs probably to be gone over for them also:

https://www.postgresql.org/docs/12/app-pg-ctl.html

"pg_ctl, like most other PostgreSQL utilities, also uses the environment 
variables supported by libpq (see Section 33.14)."

> 
>             regards, tom lane
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PGUSER and initdb
Следующее
От: Erwin Brandstetter
Дата:
Сообщение: Re: Fast, stable, portable hash function producing 4-byte or 8-byte values?