Search Postgresql Archives

Re: HOST variable in psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom,

> On 27. Apr, 2020, at 15:13, Tom Lane <tgl@xxxxxxxxxxxxx> 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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux