pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: 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: Fri, 9 Jun 2017 14:36:32 -0400
Message-ID: <33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com> (raw)
In-Reply-To: <2848.1495654447@sss.pgh.pa.us>
References: <10129.1495302480@sss.pgh.pa.us>
	<08ea5ab0-5f9a-f80a-cb2f-79058e581199@iki.fi>
	<1716.1495572263@sss.pgh.pa.us>
	<2848.1495654447@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 5/24/17 15:34, Tom Lane wrote:
> 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.

The SQL standard might permit non-breaking spaces or similar things as
token delimiters, so it could be legitimate to look into changing that
sometime.  But in any case it should be consistent, so it's correct to
make this change now.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
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)

Message-ID: <33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com>
Permalink:  ../33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com/
Also on:    postgresql.org/message-id/33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, hlinnaka@iki.fi
  Subject: Re: Tightening isspace() tests where behavior should match SQL parser
  In-Reply-To: <33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com>

* 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