Re: fix for BUG #3720: wrong results at using ltree - Mailing list pgsql-hackers

From Nikita Glukhov
Subject Re: fix for BUG #3720: wrong results at using ltree
Date
Msg-id 4c00219b-7094-e568-cc2c-6a52cf621701@postgrespro.ru
Whole thread Raw
In response to Re: fix for BUG #3720: wrong results at using ltree  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: fix for BUG #3720: wrong results at using ltree
List pgsql-hackers


On 31.03.2020 1:35, Tom Lane wrote:
Nikita Glukhov <n.gluhov@postgrespro.ru> writes:
And we even can simply transform this tail call into a loop:

-if (tlen > 0 && qlen > 0)
+while (tlen > 0 && qlen > 0)
Yeah, the same occurred to me ... and then we can drop the other loop too.
I think now it looks as simple as the whole algorithm is.

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fix for BUG #3720: wrong results at using ltree
Next
From: James Coleman
Date:
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)