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 1iv1je-0004Ni-MO for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Jan 2020 16:23:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iv1jd-00016r-3j for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Jan 2020 16:23:05 +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 1iv1jc-00016k-Nq for pgsql-hackers@lists.postgresql.org; Fri, 24 Jan 2020 16:23:04 +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 1iv1ja-0007KQ-EX for pgsql-hackers@lists.postgresql.org; Fri, 24 Jan 2020 16:23:03 +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 00OGMxxD032488; Fri, 24 Jan 2020 11:22:59 -0500 From: Tom Lane To: Alvaro Herrera cc: Peter Eisentraut , Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , Arthur Zakirov , Tomas Vondra , PostgreSQL Hackers Subject: Re: Allow to_date() and to_timestamp() to accept localized names In-reply-to: <20200124161814.GA8989@alvherre.pgsql> References: <20200124161814.GA8989@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 24 Jan 2020 13:18:14 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <32486.1579882979.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 24 Jan 2020 11:22:59 -0500 Message-ID: <32487.1579882979@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > But that's a different POV. The input to this function could come from > arbitrary user input from any application whatsoever. So the only > reason we can get away with that is because the example regression case > Juan José added (which uses non-normals) does not conform to the > standard. I'm unsure about "conforming to standard", but I think it's reasonable to put the onus of doing normalization when necessary on the user. Otherwise, we need to move normalization logic into basically all the string processing functions (even texteq), which seems like a pretty huge cost that will benefit only a small minority of people. (If it's not a small minority, then where's the bug reports complaining that we don't do it today?) regards, tom lane