Hello Tom,
> My only complaint about this is that it makes it sound like you *must*
> provide "host", even when giving "hostaddr":
That is the idea, "hostaddr" is moslty never needed.
It is the initial misleading issue I've been complaining about: one can
specify an IP *both* in host (although it is not documented) and in
hostaddr... and when both are provided, things started being messy: the
information displayed was plain wrong (eg telling you that you were
connected to an IP when you were really connected to another), and one
could not get the actual information about the current connection out of
libpq.
A committed patch has fixed the display (\conninfo) and connection
(\c) issues by extending libpq and being carefull about the message
displayed or the information used to reconnect, which were basically bug
fixes.
About host/hostaddr, my initial submission was to force "host" as the
target (whether name, directory, or ip which already work) and "hostaddr"
only as a lookup shortcut, which is I think its initial intended use. This
has been rejected.
Now I'm just trying to improve the documentation so that at least it
reflects what is done, and implicitely advise about how to use the
features properly even if it is not enforced: Basically, a user should
always used "host" for all purposes because it works, and that makes one
parameter for one purpose, and "hostaddr" is only needed for lookup
shortcut, which is basically a very rare and specialized use case.
--
Fabien.