pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid using SplitIdentifierString to parse ListenAddresses, too.
Date: Wed, 13 Nov 2019 18:52:02 +0000
Message-ID: <E1iUxkI-0003DV-Iq@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7bf40ea0d028e6dc49c152e5820a65d69b74b409

Modified Files
--------------
src/backend/postmaster/postmaster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



Message-ID: <E1iUxkI-0003DV-Iq@gemulon.postgresql.org>
Permalink:  ../E1iUxkI-0003DV-Iq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iUxkI-0003DV-Iq@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Avoid using SplitIdentifierString to parse ListenAddresses, too.
  In-Reply-To: <E1iUxkI-0003DV-Iq@gemulon.postgresql.org>
  References: <E1iUxkI-0003DV-Iq@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox