On Thu, Jun 8, 2017 at 10:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> It doesn't seem like a problem to me if somebody else wants to extend
>> it to hostaddr, though. Whether that change belongs in v10 or v11 is
>> debatable. I would object to adding this as an open item with me as
>> the owner because doesn't seem to me to be a must-fix issue, but I
>> don't mind someone else doing the work.
>
> If you want to define multiple-hostaddrs as a future feature, that
> seems fine, but I think Heikki is describing actual bugs. The minimum
> that I think needs to be done for v10 is to make libpq reject a hostaddr
> string with the wrong number of entries (either different from the
> host list, or different from 1).
Whatever you put in the hostaddr field - or any field other than host
and port - is one entry. There is no notion of a list of entries in
any other field, and no attempt to split any other field on a comma or
any other symbol. The fact that ::1,::1 looks to you like two entries
rather than a single malformed entry is just a misunderstanding on
your part, just like you'd be wrong if you thought that
password=foo,bar is a list of passwords rather than a password
containing a comma.
I think the argument is about whether I made the right decision when I
scoped the feature, not about whether there's a defect in the
implementation.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company