Re: HOST variable in psql

Поиск
Список
Период
Сортировка
Искать
От
Paul Förster
Тема
Re: HOST variable in psql
Дата
Msg-id
7053E680-139C-40D3-8F8A-68A4EFB10D4C@gmail.com
Ответ на
Список
Дерево обсуждения
HOST variable in psql Paul Förster <paul.foerster@gmail.com>
Re: HOST variable in psql Tom Lane <tgl@sss.pgh.pa.us>
Re: HOST variable in psql Paul Förster <paul.foerster@gmail.com>
Re: HOST variable in psql Tom Lane <tgl@sss.pgh.pa.us>
Re: HOST variable in psql Paul Förster <paul.foerster@gmail.com>
Hi Tom,

> On 27. Apr, 2020, at 15:13, Tom Lane  wrote:
> [ shrug... ]  When connecting via a Unix socket, psql does not have a
> relevant "hostname" to report, so it reports what it's got.  You are
> ascribing a meaning to HOST that it does not have, never has had, and
> never can have in this case.

I'm not much of a C programmer, but there's AFAIK a C function to get the hostname. So it should IMHO be easy to put something into the psql init (and \c) code that calls the function and set the HOST variable accordingly. IMHO...

> There has been some talk of providing a way to execute stuff on reconnect,
> if memory serves, but nothing's been done about it.

thought so. So I'll have to work around that.

Thanks,
Paul

В списке pgsql-general по дате отправления
От: Matthias Apitz
Дата:
От: Tom Lane
Дата:
FAQ