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 1iuUJp-0004P0-QP for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 04:42:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iuUJn-00076v-G7 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 04:42:11 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iuUJn-000753-74 for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 04:42:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuUJk-0006Yh-KE for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 04:42:10 +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 00N4g154012103; Wed, 22 Jan 2020 23:42:01 -0500 From: Tom Lane To: Arthur Zakirov cc: =?UTF-8?Q?Juan_Jos=c3=a9_Santamar=c3=ada_Flecha?= , Tomas Vondra , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Allow to_date() and to_timestamp() to accept localized names In-reply-to: References: <20190925195745.GA21894@alvherre.pgsql> <20200111160602.4wwvyl7lo3oxoewf@development> <31691.1579648824@sss.pgh.pa.us> <29432.1579731087@sss.pgh.pa.us> Comments: In-reply-to Arthur Zakirov message dated "Thu, 23 Jan 2020 12:17:22 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12101.1579754521.1@sss.pgh.pa.us> Date: Wed, 22 Jan 2020 23:42:01 -0500 Message-ID: <12102.1579754521@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Arthur Zakirov writes: > On 2020/01/23 7:11, Tom Lane wrote: >> Closer examination shows that the "max" argument is pretty bogus as >> well. It doesn't do anything except confuse the reader, because there >> are no cases where the value passed is less than the maximum array entry >> length, so it never acts to change seq_search's behavior. So we should >> just drop that behavior from seq_search, too, and redefine "max" as >> having no purpose except to specify how much of the string to show in >> error messages. There's still a question of what that should be for >> non-English cases, but at least we now have a clear idea of what we >> need the value to do. > Shouldn't we just show all remaining string instead of truncating it? That would avoid a bunch of arbitrary decisions, for sure. Anybody have an objection? regards, tom lane