From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: Tightening isspace() tests where behavior should match SQL parser
Date: Tue, 23 May 2017 16:44:23 -0400
Message-ID: <1716.1495572263@sss.pgh.pa.us> (raw)
In-Reply-To: <08ea5ab0-5f9a-f80a-cb2f-79058e581199@iki.fi>
References: <10129.1495302480@sss.pgh.pa.us>
<08ea5ab0-5f9a-f80a-cb2f-79058e581199@iki.fi>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 05/20/2017 01:48 PM, Tom Lane wrote:
>> Attached is a proposed patch. I'm vacillating on whether to
>> back-patch this --- it will fix a reported bug, but it seems
>> at least somewhat conceivable that it will also break cases
>> that were working acceptably before. Thoughts?
> +1 for back-patching. If I understand correctly, it would change the
> behavior when you pass a string with non-ASCII leading or trailing
> whitespace characters to those functions. I suppose that can happen, but
> it's only pure luck if the current code happens to work in that case.
Well, it'd work properly for e.g. no-break space in LATINn. But that
seems like a very narrow use-case, and probably not enough to justify
the misbehavior you might get in multi-byte character sets.
A compromise possibly worth considering is to apply isspace() only in
single-byte encodings. I think that's more complication than it's
worth, but others might think differently.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, hlinnaka@iki.fi
Subject: Re: Tightening isspace() tests where behavior should match SQL parser
In-Reply-To: <1716.1495572263@sss.pgh.pa.us>
* 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