Re: HOST variable in psql
| От | Tom Lane |
|---|---|
| Тема | Re: HOST variable in psql |
| Дата | |
| Msg-id | 3325.1587990006@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | HOST variable in psql (Paul Förster <paul.foerster@gmail.com>) |
| Ответы |
Re: HOST variable in psql
|
| Список | pgsql-general |
=?utf-8?Q?Paul_F=C3=B6rster?= <paul.foerster@gmail.com> writes:
> the use of :HOST in psql containing the socket directory for local connections is pretty useless for us, so we set it
tothe 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
thedatabase cluster, then :HOST gets reset to the socket directory. On the one hand, this makes sense, on the other,
theglobal 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
В списке pgsql-general по дате отправления: