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

From Alvaro Herrera
Subject Re: fix psql \conninfo & \connect when using hostaddr
Date
Msg-id 20190614223152.GA12264@alvherre.pgsql
Whole thread Raw
In response to Re: fix psql \conninfo & \connect when using hostaddr  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: fix psql \conninfo & \connect when using hostaddr
List pgsql-hackers
On 2019-Jun-13, Fabien COELHO wrote:

> Thanks for the pointer! I did not notice this one. At least the API looks
> better than the one I was suggesting:-)
> 
> ISTM that this function could be used to set other parameters, fixing some
> other issues such as ignoring special parameters on reconnections.
> 
> Anyway, attached an attempt at implementing the desired behavior wrt
> hostaddr.

BTW I tested this manually and it seemed to work as intended, ie., if I
change /etc/hosts for the hostname I am using between one connection and
the next, we do keep the hostaddr if it was specified, or we resolve the
name again if it's not.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_dump multi VALUES INSERT
Next
From: David Rowley
Date:
Subject: Re: Custom table AMs need to include heapam.h because of BulkInsertState