Re: List of hostaddrs not supported
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: "David G. Johnston" <david.g.johnston@gmail.com>,
Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
"Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>,
Mithun Cy <mithun.cy@enterprisedb.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-06-09T09:52:02Z
Lists: pgsql-hackers
On 06/08/2017 06:39 PM, David G. Johnston wrote: > These are already failing so I'd agree that explicit rejection isn't > necessary - the question seems restricted to usability. Though I suppose > we need to consider whether there is any problem with the current setup if > indeed our intended separator is also an allowable character - i.e., do we > want to future-proof the syntax by requiring quotes now? Hmm, there is one problem with our current use of comma as a separator: you cannot use a Unix-domain socket directory that has a comma in the name, because it's interpreted as multiple hostnames. E.g. this doesn't work: psql "host=/tmp/dir,with,commas" For hostnames, ports, and network addresses (hostaddr), a comma is not a problem, as it's not a valid character in any of those. I don't know if that was considered when this patch was developed. I couldn't find a mention of this in the archives. But in any case, that's quite orthogonal to the rest of this thread. - Heikki
Commits
-
Fix check for empty hostname.
- 4d06f1f858d0 10.0 landed
-
Allow multiple hostaddrs to go with multiple hostnames.
- 7b02ba62e9ff 10.0 landed
-
Silence warning about uninitialized 'ret' variable on some compilers.
- 493490cbcb19 10.0 landed
-
Give a better error message on invalid hostaddr option.
- 76b11e8a43ec 10.0 landed