Re: fix psql \conninfo & \connect when using hostaddr - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: fix psql \conninfo & \connect when using hostaddr
Date
Msg-id alpine.DEB.2.21.1906121021170.13288@lancre
Whole thread Raw
In response to Re: fix psql \conninfo & \connect when using hostaddr  (Noah Misch <noah@leadboat.com>)
Responses Re: fix psql \conninfo & \connect when using hostaddr
List pgsql-hackers
Hello Noah,

>>>> Although I guess it can be avoided by `-reuse-previous=off`, probably it
>>>> makese sense to update the docs.
>>>
>>> Yep, that is one option. The other is to revert or alter the subtle
>>> change, but ISTM that it made sense in some use case, so I wanted some
>>> time to think about it and test.
>>
>> Sure, no one argue that the behaviour should be changed, it's only about the
>> documentation part.
>
> No, I was arguing that a behavior should revert back its v11 behavior:

I got that. I'm working on it, and on the other issues you raised.

The issue I see is what do we want when a name resolves to multiple 
addresses. The answer is not fully obvious to me right now. I'll try to 
send a patch over the week-end.

> \connect mydb myuser myhost
> -- should resolve "myhost" again, like it did in v11
> \connect
>
> \connect "dbname=mydb host=myhost hostaddr=127.0.0.1"
> -- ok to reuse hostaddr=127.0.0.1; I agree that's a feature
> \connect

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_basebackup failure after setting default_table_access_methodoption
Next
From: Pavel Stehule
Date:
Subject: Re: set parameter for all existing session