From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal: Implement failover on libpq connect level. |
Date: | 2015-09-03 17:04:06 |
Message-ID: | 20150903170406.GD2912@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
Shulgin, Oleksandr wrote:
> > Alternatively, change the rules for parsing the existing host=X
> > parameter so that we split it on some separator that isn't a valid
> > hostname character, and then strip off an optional :port syntax from
> > each entry; that value, if present, overrides port=X for that entry.
>
> It's tempting to use ':' as the separator here, but it's still valid for
> directory names and host can be one in case of UN*X sockets.
I think that's rare enough that we could just say that if you want to
have a : in a directory name used for local connections, you have to
escape the : character. This is going to be pretty easy to detect as a
problem because of the obvious error message ("cannot parse "pg" in
/usr/sockets:pg as a port number"), except in the even rarer case that
the only stuff after the colon is digits.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2015-09-03 17:04:23 | Re: Proposal: Implement failover on libpq connect level. |
Previous Message | Shulgin, Oleksandr | 2015-09-03 16:57:31 | Re: Proposal: Implement failover on libpq connect level. |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2015-09-03 17:04:23 | Re: Proposal: Implement failover on libpq connect level. |
Previous Message | Shulgin, Oleksandr | 2015-09-03 16:57:31 | Re: Proposal: Implement failover on libpq connect level. |