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.1811171703090.16105@lancre
Whole thread Raw
In response to Re: fix psql \conninfo & \connect when using hostaddr  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: fix psql \conninfo & \connect when using hostaddr
List pgsql-hackers
>> I'm working on improving the patch.
>
> Cool.

Here is the updated v2

  - libpq internal function getHostaddr get a length,
    and I added an assert about it.
  - added a few braces on if/if/else/if/else/else
  - added an UNKNOWN_HOST macro to hide "???"
  - moved host_addr[] declaration earlier to avoid some braces
  - I have not refactored psql connection message,
    but finally agree with Pavel & you have a point.

-- 
Fabien.
Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: fix psql \conninfo & \connect when using hostaddr
Next
From: Justin Pryzby
Date:
Subject: Re: pg11.1 jit segv