On Mon, Oct 24, 2016 at 4:40 PM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Umm, my recollection regarding IPv6 parsing in the URI syntax is that > those must appear inside square brackets -- it's not valid to have the > IPv6 address outside brackets, and the port number is necessarily > outside the brackets. So there's no ambiguity. If the current patch is > allowing IPv6 address to appear outside of brackets, that seems like a > bug to me.
I agree. > The string conninfo spec should not accept port numbers in the "host" > part. (Does it?) Not currently, but the proposed patch would cause it to do so. >> So now I think that to make this work correctly, we're going to need >> to change both the URL parser and also add parsing for the host and >> port. Let's say the user says this: >> >> postgresql://[1::2]:3,[4::5],[6::7]::8/ > > (There's a double colon before 8, I suppose that's just a typo.) Oh, yeah. Right. >> It is not obvious what it means if there are multiple ports but the >> number doesn't equal the number of hosts. > > I think we should reject the case of differing number of elements and > neither host nor port is a singleton, as an error. The suggestion to > ignore some parts seems too error-prone. OK, can do. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers