Re: fix psql \conninfo & \connect when using hostaddr
От | Robert Haas |
---|---|
Тема | Re: fix psql \conninfo & \connect when using hostaddr |
Дата | |
Msg-id | CA+TgmobO5U=q4HR_SL3KBwoinbjmktXNyU9XDNfLBmVh7ib69w@mail.gmail.com обсуждение исходный текст |
Ответ на | fix psql \conninfo & \connect when using hostaddr (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: fix psql \conninfo & \connect when using hostaddr
|
Список | pgsql-hackers |
On Fri, Oct 26, 2018 at 9:54 AM Fabien COELHO <coelho@cri.ensmp.fr> wrote: > About updating psql's behavior, without this patch: > > sh> psql "host=foo hostaddr=127.0.0.1" > > psql> \conninfo > You are connected to database "fabien" as user "fabien" on host "foo" at port "5432". > # NOPE, I'm really connected to localhost, foo does not even exist > # Other apparent inconsistencies are possible when hostaddr overrides > # "host" which is an socket directory or an IP. I remain of the opinion that this is not a bug. You told it that foo has address 127.0.0.1 and it believed you; that's YOUR fault. > After the patch: > > sh> psql "host=foo hostaddr=127.0.0.1" > > psql> \conninfo > You are connected to database "fabien" as user "fabien" on host "foo" (address "127.0.0.1") at port "5432". > # better Nevertheless, that seems like a reasonable change to the output. Will your patch show the IP address in all cases or only when hostaddr is specified? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: