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 1rG6w4-00DmgA-Fj for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Dec 2023 00:29:12 +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 1rG6w3-000som-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Dec 2023 00:29:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rG6w2-000soe-NP for pgsql-hackers@lists.postgresql.org; Thu, 21 Dec 2023 00:29:10 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rG6w0-00BPdW-1o for pgsql-hackers@lists.postgresql.org; Thu, 21 Dec 2023 00:29:09 +0000 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-42594f0ca09so1113551cf.0 for ; Wed, 20 Dec 2023 16:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ardentperf-com.20230601.gappssmtp.com; s=20230601; t=1703118546; x=1703723346; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SYlF9Savym7XlICKimB9bVkWAWczEgSsAanERFHMuwQ=; b=RGDFpvCkVQPVhG/uLtPcYkUN278XpBoPf0M4+V1YDtJz4BPjMiuQdxZtAi/F/DjeXb J5lh3AM2ZUIdQdhu2/L+093s5XtH7w+EzStNSUWfZgXJXUwbyQao96nEeRP1IjurJ9A2 FBW2Nyx4AMjinEf4Q41l4RYP3TIk6rVFz7hLxpYcNWPhTn9P/9ViecvfPmfmIavZYakg EBnP4hMsDf2cKBEbe8nbY6LYTNek0a9Twj73qpRhAXFd4LAVsH9sToM6FJZyqm02F4sq 3ojNvb3lwglZ7QscQLKXmmUgnUDaQJkAaty+leM9ZcGGuavjqWCTbDVKHSRrslAe2xd5 Ji2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703118546; x=1703723346; h=content-transfer-encoding:in-reply-to:references:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SYlF9Savym7XlICKimB9bVkWAWczEgSsAanERFHMuwQ=; b=TGo2GZF8R5fUzbcLQa36Mpr+vA/gi2skJ6DgbMwWb5AqrXLTjdGVhf8af1PvTQMFGq XR6eOItH2R8K/SJhkyt8UqqAk7v23YSHSm8M1keS11/TKC4hkYKC6C5s+1Z6HmHn48zW MXp0HmucGgQFAqeZgkx3/thcRI4BQY60RVGwUga0aeTg47LVL66QwWehpBKwYg1UOwB6 3Q4pW6oHlXLGDOdaS4xkQDJxEpjVDD17t/hA6EkzpC3GWmDkUQbb1VErroi5vdQohajH cgOjTlfucjWBbLdT48TAg/udlo6rdBHuBasSGUXbmLwGr2SuSrA0mUp1VSXEJXInJcwp FMMw== X-Gm-Message-State: AOJu0Yx8nPjoOnEVPxyn5kx7c9TNG1ktxhOF5r1JRYipqDhL91wrrt5V L2txRLHcJ8989qu/SEXrcKkuSZXkuAR9rJif1dE= X-Google-Smtp-Source: AGHT+IE6mhloz4t1NMLVb79Zzhye+F38nsYecIx7j/LNtFdHPDyHEWLyfUa4ju4EZNQRm8FI2EClZg== X-Received: by 2002:ac8:7d89:0:b0:425:4043:8d40 with SMTP id c9-20020ac87d89000000b0042540438d40mr22381396qtd.91.1703118546365; Wed, 20 Dec 2023 16:29:06 -0800 (PST) Received: from [192.168.193.111] (54-240-198-34.amazon.com. [54.240.198.34]) by smtp.gmail.com with ESMTPSA id eo12-20020a05622a544c00b00427692bc384sm334086qtb.66.2023.12.20.16.29.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Dec 2023 16:29:05 -0800 (PST) Message-ID: Date: Wed, 20 Dec 2023 16:29:02 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Built-in CTYPE provider Content-Language: en-US From: Jeremy Schneider To: pgsql-hackers@lists.postgresql.org, "Davis, Jeff" References: <8a1ae216-8150-41e2-a98d-09c57e3dc90f@ardentperf.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/20/23 4:04 PM, Jeremy Schneider wrote: > On 12/20/23 3:47 PM, Jeremy Schneider wrote: >> On 12/5/23 3:46 PM, Jeff Davis wrote: >>> CTYPE, which handles character classification and upper/lowercasing >>> behavior, may be simpler than it first appears. We may be able to get >>> a net decrease in complexity by just building in most (or perhaps all) >>> of the functionality. >> >> I'll be honest, even though this is primarily about CTYPE and not >> collation, I still need to keep re-reading the initial email slowly to >> let it sink in and better understand it... at least for me, it's complex >> to reason through. 🙂 >> >> I'm trying to make sure I understand clearly what the user impact/change >> is that we're talking about: after a little bit of brainstorming and >> looking through the PG docs, I'm actually not seeing much more than >> these two things you've mentioned here: the set of regexp_* functions PG >> provides, and these three generic functions. That alone doesn't seem >> highly concerning. > > I missed citext, which extends impact to replace(), split_part(), > strpos() and translate(). There are also the five *_REGEX() functions > from the SQL standard which I assume are just calling the PG functions. found some more. here's my running list of everything user-facing I see in core PG code so far that might involve case: * upper/lower/initcap * regexp_*() and *_REGEXP() * ILIKE, operators ~* !~* ~~ !~~ ~~* !~~* * citext + replace(), split_part(), strpos() and translate() * full text search - everything is case folded * unaccent? not clear to me whether CTYPE includes accent folding * ltree * pg_trgm * core PG parser, case folding of relation names -- http://about.me/jeremy_schneider