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:
> the use of :HOST in psql containing the socket directory for local connections is pretty useless for us, so we set it to the hostname in a global psqlrc file:
> \set HOST `hostname -s`
> This works great when invoking psql on the command line. But if I perform a \c to connect to a different database in the database cluster, then :HOST gets reset to the socket directory. On the one hand, this makes sense, on the other, the global psqlrc file does not seem to be executed again, thus leaving :HOST in an unuable state for us:

AFAICS, psql is behaving as documented.  Why are you trying to override
HOST like that, instead of just using some other variable?

			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