aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-11-13 13:51:58 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-11-13 13:51:58 -0500
commit7bf40ea0d028e6dc49c152e5820a65d69b74b409 (patch)
treeb4c98272e1f33b480c7e6c97e064688004812e21
parent7618eaf5f315f53619b718e571cd2a2020fb0226 (diff)
downloadpostgresql-7bf40ea0d028e6dc49c152e5820a65d69b74b409.tar.gz
postgresql-7bf40ea0d028e6dc49c152e5820a65d69b74b409.zip
Avoid using SplitIdentifierString to parse ListenAddresses, too.
This gets rid of our former behavior of forcibly downcasing the postmaster's hostname list and truncating the elements to NAMEDATALEN. In principle, DNS hostnames are case-insensitive so the first behavior should be harmless, and server hostnames are seldom long enough for the second behavior to be an issue. But it's still dubious, and an easy fix is available: just use SplitGUCList instead. AFAICT, all other SplitIdentifierString calls in the backend are OK: either the items actually are SQL identifiers, or they are keywords that are short and case-insensitive. Per thinking about bug #16106. While this has been wrong for a very long time, the lack of field complaints means there's little reason to back-patch. Discussion: https://postgr.es/m/16106-7d319e4295d08e70@postgresql.org
-rw-r--r--src/backend/postmaster/postmaster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 5f303591652..9ff2832c002 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1134,7 +1134,7 @@ PostmasterMain(int argc, char *argv[])
rawstring = pstrdup(ListenAddresses);
/* Parse string into list of hostnames */
- if (!SplitIdentifierString(rawstring, ',', &elemlist))
+ if (!SplitGUCList(rawstring, ',', &elemlist))
{
/* syntax error in list */
ereport(FATAL,