Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ2eM-0000JH-7X for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 22:12:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJ2eK-0000gi-5J for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 22:12:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ2eJ-0000gb-Uk for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2020 22:12:51 +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 1jJ2eH-0002IF-6h for pgsql-hackers@postgresql.org; Mon, 30 Mar 2020 22:12:51 +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 02UMCgYE003844; Mon, 30 Mar 2020 18:12:42 -0400 From: Tom Lane To: Nikita Glukhov cc: =?UTF-8?Q?Filip_Rembia=c5=82kowski?= , Pgsql Hackers , Tomas Vondra , Alexander Korotkov , Oleg Bartunov , Thomas Munro , Teodor Sigaev Subject: Re: fix for BUG #3720: wrong results at using ltree In-reply-to: <3007.1585605566@sss.pgh.pa.us> References: <28639.1554565562@sss.pgh.pa.us> <5eedfd9e-2f14-a2df-3bd9-4c92eb0f08a5@postgrespro.ru> <20200124182915.zz7hzdkijzsb4ic4@development> <19375.1585438012@sss.pgh.pa.us> <15582.1585529626@sss.pgh.pa.us> <23304.1585591242@sss.pgh.pa.us> <943dc224-eb82-8abd-15c3-f4b516f89767@postgrespro.ru> <3007.1585605566@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 30 Mar 2020 17:59:26 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3842.1585606362.1@sss.pgh.pa.us> Date: Mon, 30 Mar 2020 18:12:42 -0400 Message-ID: <3843.1585606362@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > I dunno, that doesn't really seem clearer to me (although some of it > might be that you expended no effort on making the comments match > the new code logic). ... although looking closer, this formulation does have one very nice advantage: for the typical non-star case with high = low = 1, the only recursive call is a tail recursion, so it ought to consume less stack space than what I wrote. Let me see what I can do with the comments. regards, tom lane