Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ttZzF-00EiJx-9b for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Mar 2025 22:28:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ttZzB-0045u8-Gr for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Mar 2025 22:28:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ttZzB-0045u0-5u for pgsql-hackers@lists.postgresql.org; Sat, 15 Mar 2025 22:28:05 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ttZz7-003515-1Z for pgsql-hackers@postgresql.org; Sat, 15 Mar 2025 22:28:04 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5497590ffbbso3487890e87.1 for ; Sat, 15 Mar 2025 15:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742077681; x=1742682481; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=g+nt4bkfp8efAkQnidd10kyCh2flv59cdjY4lVTH7Yo=; b=KtbD3RqLRR+IK82nwq6i847jzNcPRlaxVAjjBgBZqiOkRwOxFnBSdu3gJp16wjaaCC runs3MLYa/mFBknBw55ulSKyFu1WMVXKyyLCVNIaKEdrPIZtzl29mG+ahb59Yks+zaas btte/9Mb1T3MCBsxCQaxDoMq6SwRC1C6nUrG065BT+aPNqwuCl1zpYQZJiRCeJcaVmXa 23xpnZ5XZTPdAGgeWNea48jFoBAmZ/f2XGH2cFH4S55pOJtciBna332f8tBH+Xa0zi+o yPLDB16V5rX2wtHlW0CdJkG7ERUuEVSCxMb+nnJcEW7/g5hJjHcPb7ruA4jbWYhPyDTW HkZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742077681; x=1742682481; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g+nt4bkfp8efAkQnidd10kyCh2flv59cdjY4lVTH7Yo=; b=H4eDKwhDe/eKbrTPFyOQMcmyV/tAuIRYni6YPT4lrdwkoq3e9g9bgnDUh6qSF+3QVA BZq/A72BZeg2OgIn+ZDsMXiY6iq0KBsZH1396wMJWR4GLa5VNTjltBqtJLQmAlQwCC/Z anFOzOV2MtpXajS1LyYAgLYMG0iCAmrb7VZsjMguu2S62R71kphPw0RLvqYtT3PH9NXa B8p6JNMkB7n8iU/eBXYJ3w9GS6Fe9VQ2fpdCt/fopiUg1PA9U1H7Gqlwr2BIVzIa4quM MiIb5Vz3bgZv/qophtmAoYEP3oVxiwtWDKB1zt6LZxMnFUoFaFH7gzx6i7t67v96KVZ6 ntLA== X-Forwarded-Encrypted: i=1; AJvYcCVuGjnZbng6mP1eWKC7hOMxRPpc9YTrutlsKGaHikXnK2QsFTUote0Y1ZGrOKGkybCnr5a5r9XFEEluXTrN@postgresql.org X-Gm-Message-State: AOJu0YwLcMcKhzFtJlZrazk0TfYsa+ChB6Scw//ZeFjqA/O9kN/B9WOi 62rBYzZAHdRfaLn86nIv80Bh1DHEjHNr95etmWqA18OhIr9PolKG X-Gm-Gg: ASbGncvQyb80ZvQLX88uU4IwYck3B/4bvLMKQ4+0yWwXFq7h4jB3BcnzAYQn6236eMK PiXxc3L6UTNKt8qKrYjV02BK8JOzGcmKU8ZySPT+LC2WIqwsi1UYReAyY/RBfvcu4+Di4+plVQ0 3mnl4EmDvyeNflQqeQM/qrKCtpbdVA6WAzi0mMCeKdLKoGJuvCM4VJtX4bblS8unEhpNj31iICV goAP0XOG5/0GBrKDlQgF3xnf90nbEjImsSX0AYeIsdaBZQhtkB8ZrxUpvalW/IoRJN2MaR+K7ms IAyY6et7GodC9jh31A3QS6wEVy+x82I18vk7+LdQ1fOw90uek0/J+Xh+vW4iFLqNyyEYiIL7f9I Ez115sq64X88ULLYYUfAMZBlHuFk= X-Google-Smtp-Source: AGHT+IG7YBJ76ZsujltjdSpAE3OR79Joy4vGEWlxlpEnHHbs7iGN76twUBjEWhYkkhpZKXuTI8Dweg== X-Received: by 2002:a05:6512:1050:b0:549:43f8:824 with SMTP id 2adb3069b0e04-549c390e064mr2508094e87.26.1742077681144; Sat, 15 Mar 2025 15:28:01 -0700 (PDT) Received: from [192.168.50.127] (broadband-188-255-2-52.ip.moscow.rt.ru. [188.255.2.52]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-549ba8a761asm905254e87.229.2025.03.15.15.28.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Mar 2025 15:28:00 -0700 (PDT) Message-ID: Date: Sun, 16 Mar 2025 01:28:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Optimization for lower(), upper(), casefold() functions. To: Jeff Davis , Heikki Linnakangas , pgsql-hackers@postgresql.org References: <7cac7e66-9a3b-4e3f-a997-42aa0c401f80@gmail.com> <12956299-1496-4455-b3ab-299cc0a87d7c@gmail.com> <340f2451-cd76-487b-a1e4-0f0a2fe91fba@gmail.com> <3ffb8b75b26e76624668c0883cac7886468c5d07.camel@j-davis.com> <5cf176fa-44b9-4019-b9b7-ee902352a844@gmail.com> <3080de9bcce916cf8720ac197f634e381c4de564.camel@j-davis.com> <1e3f4f6f-9b12-4109-b0d2-a4c52b5064f8@gmail.com> <4f3772355e038acd3cfe0be43ae2c1aacae1794d.camel@j-davis.com> <2c10910c21b16cb9a0e5f67d80589e3acae2b6ef.camel@j-davis.com> <44005c3d-88f4-4a26-981f-fd82dfa8e313@gmail.com> <2a9e520ba41b318df8ed396ef99ed1e3d3e4b5b6.camel@j-davis.com> <5b6a619b-58dc-4f55-8398-97595f559794@gmail.com> <177451ea791a1f90039ea3047f1f890b1f9ae1db.camel@j-davis.com> Content-Language: ru From: Alexander Borisov In-Reply-To: <177451ea791a1f90039ea3047f1f890b1f9ae1db.camel@j-davis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 15.03.2025 23:07, Jeff Davis wrote: > On Fri, 2025-03-14 at 15:00 +0300, Alexander Borisov wrote: >> I tried adding a loop to create tables, and everything looks fine >> (v7). [...] > I prefer to generalize when we have the other code in place. As it was, > it was a bit confusing why the extra arguments and subroutines were > there. Thanks Jeff for the review of my patch! > Also, make_ranges() doesn't seem to do what is described in the > comment: it produces a single range. I changed "> $limit" to ">= > $limit", but then it generates 3 ranges, not two. I rewrote it to be > more clear what's going on: [...] I had some comments, but since the patch is already committed, it's fine. > When looking around, I didn't find a lot of material discussing this > generated-branches approach. While it's mentioned a few places, I > couldn't even find a consistent name for it. If you know of something > where I can read some more analysis, please send a link. Unfortunately, I can't send any links. I came up with this myself, for my project https://github.com/lexbor/lexbor. I saw that Postgres could improve the approach to Normalization Form, then I noticed that case is not all good either. That's why I took it up. In other words, this approach is purely my idea, and it is showing well. I really like Postgres and want to help you improve it, and I'm very good at Unicode. I feel like my knowledge will be useful for Postgres. Thank you Jeff again for your time. Regards, Alexander Borisov