Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iugfU-00089b-7K for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 17:53:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iugfS-0002E4-DZ for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 17:53:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iugfR-0002Dw-SC for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 17:53:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iugfP-0004zf-G5 for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 17:53:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00NHrGPD008745; Thu, 23 Jan 2020 12:53:16 -0500 From: Tom Lane To: Alvaro Herrera cc: Arthur Zakirov , Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , Tomas Vondra , PostgreSQL Hackers Subject: Re: Allow to_date() and to_timestamp() to accept localized names In-reply-to: <20200123164955.GA23074@alvherre.pgsql> References: <20200123164955.GA23074@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 23 Jan 2020 13:49:55 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8743.1579801996.1@sss.pgh.pa.us> Date: Thu, 23 Jan 2020 12:53:16 -0500 Message-ID: <8744.1579801996@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Even whitespace is problematic for some languages, such as Afan, > mon "Qunxa Garablu";/ > "Naharsi Kudo";/ > "Ciggilta Kudo";/ > (etc) but I think whitespace-splitting is going to be more comprehensible > in the vast majority of cases, even if not perfect. Interesting. Given that to_date et al are often willing to ignore whitespace in input, I wonder whether we won't have some other issues with names like that --- not so much that basic cases wouldn't work, as that people might reasonably expect that, say, we'd be flexible about the amount of whitespace. Seems like a problem for another day though. In the meantime, I agree that "truncate at whitespace" is a better heuristic for the error messages than what we've got. I'll go make it so. regards, tom lane