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 1uSKR4-006FY7-2l for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 18:56:30 +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 1uSKR1-00E2Js-LQ for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2025 18:56:28 +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 1uSKR1-00E2Jk-Bc for pgsql-hackers@lists.postgresql.org; Thu, 19 Jun 2025 18:56:27 +0000 Received: from mail-wr1-f47.google.com ([209.85.221.47]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uSKR0-002wBR-0K for pgsql-hackers@postgresql.org; Thu, 19 Jun 2025 18:56:27 +0000 Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3a4e742dc97so1413412f8f.0 for ; Thu, 19 Jun 2025 11:56:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750359384; x=1750964184; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G0I/9+JZt2Y0p/vY55s7gEeFmRRKosjRaD4NAhGdQFw=; b=NAi3vxBGIAnoA79jUjFp43w9t9J2rujIIBGTik1XX1UOWWI4dGs9nKo51dEqkLIP3v pCH8qui2g61bwA6Sy/zySXDmX25xIj2itQLh6tbr164AIl/dVWTAfl+kC3DomyXq66aC yl9oU08i2CbNsWoWS/t//WtpMss80Xr/1K+0S1RTxnhFyRGCs7D54O1zpolZ9vUPCvV1 CFVwHo7HQVJAONXHj6eg+Pz43BVLYf1otohuKKCViJy6fqdcDeVaOhSbO8c64yyEGEBY rc5qiogeoOlpqeEI4JRd/jA2PVgTQawAySYcVAGeBd3YDkGCw5ugB/+ZQCrxCps+yGzO jqbQ== X-Forwarded-Encrypted: i=1; AJvYcCV5/z3n43kFJ13gJpSBnHn9GgVI5nPBAoMBxXpSlDxCCM2HMG491clvVgj8KXBg9is0F7f7hqKDORwK9mVD@postgresql.org X-Gm-Message-State: AOJu0Yz9si1RVLpx45ZDhwwdpnyTgbzjwmgRadYEpbcHth1E0v7qrCRB KMk4cwku62XkeEAdJwIZ2dyA9OQo0oPCE7j233DGsd3yMobi596XPs4FB8tD65OxYH+QuFzxnRE vjRV+rGu0nWf+ETO1ZAjU5m2mdDpEM1A= X-Gm-Gg: ASbGncvU1Od2D5HA4o7erC1unOaZOFRoKbKiH8x6NrvmCSHRIfC4quoUWHaiqsjmutr 8aajpLQ6/nTTwiYlgi7I6QRQC3N0UTyO1Q6lMdNRDuPhJJ6pOQUbaxCpYcYC1rGTm0aUY27bG8k j9F1YLY7sU8PKv5l3XKWrG18tFzKXDXa41wPw8Wdzy370B X-Google-Smtp-Source: AGHT+IEzjAUlBOudcs/cRkSfv5cLayLHeX85EXn/v/EazCaiJEMm92cdkkqhsj67v01ruyxpCsU0YnNmDJdNf+lUevw= X-Received: by 2002:a05:6000:2289:b0:3a5:1241:afde with SMTP id ffacd0b85a97d-3a6d13320bdmr90404f8f.9.1750359384193; Thu, 19 Jun 2025 11:56:24 -0700 (PDT) MIME-Version: 1.0 References: <47716a78-eb0b-4728-8991-fc0d958a01c9@joeconway.com> <36f69fa9-db3f-44a1-8c8a-95ff09704a9c@postgresfriends.org> <692d28a2-d5f8-4db5-a3ad-c7db9bab522f@postgresfriends.org> <81AFE376-ACFE-4F78-A33B-9B5F2339FDA7@justatheory.com> In-Reply-To: <81AFE376-ACFE-4F78-A33B-9B5F2339FDA7@justatheory.com> From: Thom Brown Date: Thu, 19 Jun 2025 19:55:43 +0100 X-Gm-Features: Ac12FXxAzkqAnE35dh8lZ1_CuJ3ZGlp_PYg-koFpb3YR37WQiQsO1yyxyH2RqGA Message-ID: Subject: Re: Add CASEFOLD() function. To: "David E. Wheeler" Cc: Jeff Davis , Peter Eisentraut , Vik Fearing , Joe Conway , Ian Lawrence Barwick , PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 19 Jun 2025 at 18:39, David E. Wheeler wrot= e: > > On Jun 19, 2025, at 12:59, Thom Brown wrote: > > > No. But given the options, I would personally choose nondeterministic c= ollations now that they are available. I just wish they were more user-frie= ndly as I suspect the majority of people either won't know about them, or w= on't know how to use them. > > I suspect there are a lot of uses of citext for databases created before = nondeterministic collations existed and people are unaware of them or uncle= ar on the migration path from one to the other, let alone implications for = any infrastructure they built around cutest (like function signatures and r= eturn values). As long as citext conteinues to be maintained there and ther= e=E2=80=99s no super clear path to migrate, I=E2=80=99d bet good money that= few would bother to switch. Maybe the citext doc page should explain how to get unhooked from it. Something like: ALTER TABLE mytable ALTER COLUMN ci_column SET DATA TYPE TEXT COLLATE case_insensitive_collation; or CREATE DOMAIN ci_text AS text COLLATE case_insensitive_collation; ALTER TABLE mytable ALTER COLUMN ci_column SET DATA TYPE ci_text; And because they're binary-compatible, they should also be free. No doubt a procedure could do this to every instance in the database, although I guess it gets trickier when it comes to functions that accept citext as a parameter type, and other similar examples. Thom