Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDc86-0003Do-Mm for pgsql-hackers@arkaria.postgresql.org; Wed, 24 May 2017 19:39:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dDc85-000433-Pc for pgsql-hackers@arkaria.postgresql.org; Wed, 24 May 2017 19:39:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDc3B-0000Lc-EN for pgsql-hackers@postgresql.org; Wed, 24 May 2017 19:34:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dDc38-0004SR-BG for pgsql-hackers@postgresql.org; Wed, 24 May 2017 19:34:28 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4OJY88s001844; Wed, 24 May 2017 15:34:09 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers@postgresql.org Subject: Re: Tightening isspace() tests where behavior should match SQL parser 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> Comments: In-reply-to Tom Lane message dated "Tue, 23 May 2017 16:44:23 -0400" Date: Wed, 24 May 2017 15:34:07 -0400 Message-ID: <2848.1495654447@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > Heikki Linnakangas 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   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