pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Wed, 24 May 2017 15:34:07 -0400
Message-ID: <2848.1495654447@sss.pgh.pa.us> (raw)
In-Reply-To: <1716.1495572263@sss.pgh.pa.us>
References: <10129.1495302480@sss.pgh.pa.us>
	<08ea5ab0-5f9a-f80a-cb2f-79058e581199@iki.fi>
	<1716.1495572263@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

I wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> +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.

Actually, it's dubious that treating no-break space as whitespace is
correct at all in these use-cases.  The core scanner would think it's
an identifier character, so it's not impossible that somebody would
consider it cute to write &nbsp; as part of a SQL identifier.  If
the core scanner accepts that, so must these functions.

Hence, applied and back-patched.

			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



view thread (5+ messages)  latest in thread

Message-ID: <2848.1495654447@sss.pgh.pa.us>
Permalink:  ../2848.1495654447@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2848.1495654447@sss.pgh.pa.us

 · 

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 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: <2848.1495654447@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