Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJOnV-0003Lm-4P for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2017 18:38:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dJOnU-0005SU-FV for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2017 18:38:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJOlz-0002mJ-NO for pgsql-hackers@postgresql.org; Fri, 09 Jun 2017 18:36:39 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dJOlv-0007V6-Fe for pgsql-hackers@postgresql.org; Fri, 09 Jun 2017 18:36:38 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id DDA6F209EE; Fri, 9 Jun 2017 14:36:33 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 09 Jun 2017 14:36:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=M0s6hcGOeb//mI3p8qaILI8TzHRjXz5HSL3ntp/2H3M=; b=d2+9489g kmlEr/c/1F0xaYlPh8ZVkgohNPDzDy0wC9twFSTwYaYemTIgpBl7iHGEQxJLd4RO 9IUQ5BbI1RGqicRJu2LOJFtO+kukNzTDcMg3HJKH9CDFhPqUrfR5QTnoOyAOyQFh /JISLf4egKS9uJ6A57i+Y8FEaC8DD1lKQSP1yA3/xJEjZAMZ4cnvADl5GAGzYeyU E2X5fThTnFeSekaZDYWZo1uoWPrRSY4y89vQHtIuMt4IUqxOR7J6c37XydWjAYJV 8mpSx3Ywe4Vi5LHp5Bfl0tGZNbERXpVttu36QfQKTQiMjZs66Z1BeFpJ0+2zJrFz j+Sy4V57TSdDEQ== X-ME-Sender: X-Sasl-enc: fb5Q83w5Z9L+1pKc3l67m/muZ7qyymtGFIoUBejprHOm 1497033393 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 980A024407; Fri, 9 Jun 2017 14:36:33 -0400 (EDT) Subject: Re: Tightening isspace() tests where behavior should match SQL parser To: Tom Lane , Heikki Linnakangas 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> Cc: pgsql-hackers@postgresql.org From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <33cd5f6d-8d8a-b127-a6eb-90c09fb1f44f@2ndquadrant.com> Date: Fri, 9 Jun 2017 14:36:32 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <2848.1495654447@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 5/24/17 15:34, Tom Lane wrote: > 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. 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