Search Postgresql Archives

Re: HOST variable in psql

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

 



=?utf-8?Q?Paul_F=C3=B6rster?= <paul.foerster@xxxxxxxxx> writes:
>> On 27. Apr, 2020, at 14:20, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
>> AFAICS, psql is behaving as documented.  Why are you trying to override
>> HOST like that, instead of just using some other variable?

> I could but

> a) HOST is HOST and should not point to a socket directory. A socket directory is not a HOST. This makes no sense, especially since I see no use for using a socket directory in any psql script. There are tons of use cases for the hostname, though.

[ 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.

> c) the docs are IMHO not 100% clear on this. I think the psqlrc should be executed on EVERY new connect, hence including \c, and this is how I interpret the docs too. But it doesn't...

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

			regards, tom lane






[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