Re: Tightening isspace() tests where behavior should match SQL parser

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgreSQL.org
Date: 2017-05-23T10:56:58Z
Lists: pgsql-hackers
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. 
And even if so, it's IMO still quite reasonable to change the behavior, 
on the grounds that the new behavior is what the core SQL lexer would do.

- Heikki



Commits

  1. Tighten checks for whitespace in functions that parse identifiers etc.