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.96) (envelope-from ) id 1w0qv4-002GLJ-0m for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 01:02:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0qv2-0012VQ-2K for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 01:02:25 +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.96) (envelope-from ) id 1w0qv2-0012VI-18 for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 01:02:24 +0000 Received: from mail-dl1-x122f.google.com ([2607:f8b0:4864:20::122f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0qv0-00000001rB0-2gRL for pgsql-hackers@postgresql.org; Fri, 13 Mar 2026 01:02:23 +0000 Received: by mail-dl1-x122f.google.com with SMTP id a92af1059eb24-126ea4b77adso2176095c88.1 for ; Thu, 12 Mar 2026 18:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1773363742; x=1773968542; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=PjzBTA4NsttVSL/iDUmC1eqN4bqCWpSDbuvlUBo0Zl8=; b=ZdUcb/UfxH2lkFyy6k6ZdB/UyE2MMEPhk3U9Yt+wB1hqh+KFb6obD5OuSNYMuJdvQY UTzj2N/gYs/Jvf+qmeW111ufOjOJNmSKFhcMbYQvReK6MsZu2906FUidASgu0Shob61Q 1iZh+u7fDzLOYiQ2gHiBoG/8Pqb+CpHpcKCyt7ZPAC9s4/MYruF+2gV/01IIRyCP2ksb 0G3qNQ1vUKiWTtk2YKxAso1XN8OtCMFT+kcSMBgQqt0/mnNdhHE05cEb02eTvIy9tM0Z ByyJx4ulD/G6W6kBAhw7J3NAmx5yh+fSXwFukCZtvxj/24YwyPnHLBkzTzUvMugps/Hv /skg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773363742; x=1773968542; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PjzBTA4NsttVSL/iDUmC1eqN4bqCWpSDbuvlUBo0Zl8=; b=HaCKhHj1pvZwkogq4CG8J9lkHWZ0nAWf3AEHQ6e4s6GNvU+PN4IN2raH/MtkHZ1+UA 7jOOx802RESg9wwCdHlfAWicM0t1Sqk+CqfV+L90RIMx/5dvuxiXUw9g6pwR0ivle2OU 0kd219GggxwergkvvELc15JZqQWpWWmyyjRrSDt4TWBWPw3kC40PwdUwtp0nVY+uuK52 IpE480HMvmxfEW9qE//6WGevnGeF+cPkT5MsD3BlHZ4ho33AWpgZ+GvsRTUCnToAT/IA 1GiKQBJfHrpvohivFSiuyUkrknIYkP4gwGZTp87qEDt3/o+kdcHcdIDtNSBknV/FXYmd KpzQ== X-Gm-Message-State: AOJu0YwGpipkDWk/fJTa3WZZATb1lUwhiIt8KFQfH9RsxIoYKuTZs+f5 hILvv83hBA3BqWna4NwU+ZPh8iCuoja98gBBD9866U7rRHfoISqSZzDToT/pjp//zQ== X-Gm-Gg: ATEYQzxjgAi0+OxVd6hVJ3I+D6fnGqtotf3btiBYeFdMyGqh2XrnZdq2syT5hwv1qeb uCwpxBYRSzGs+uL4KglJrj1NdVvl++8uK4wzdWGCBRntDgUNxsJrB4ly5xJFxLR58lUbz0N7LaI sShGt5PcJGRn/eq0vfZjbqK/fhsqqegl+/QOxhE4HKwxg5XYEf6QZ5LGsFd+fVkdGSQwFECChU3 xrQtGeWpd6bSjL0fZwq/2ABeLks9ZAPFgJQ/MxxfGxGllRn2UARxh95PXlyR/zsLcPKNhTa9Kw4 QuA0fXFqWRmiN8DcV5hTXVZ/JwjQlWLL8bILsxAxcNVI+t68QtF1lcKMvZ3yqNmZkf++QHugFUb kSf5LD2VQqMFDImYI+PGvdqrOFcXcD5Vehuz9TkjTuEVzcedXao9vu5FqOC+w2tNkOJCO+3fRzQ m5OjAp9zx3Cg6C03PqGsf679etgwBaKb/Yo+zzEeO3xFihASDuY6Q= X-Received: by 2002:a05:7022:688b:b0:128:ea68:27f1 with SMTP id a92af1059eb24-128f3dc5fd4mr682579c88.23.1773363741399; Thu, 12 Mar 2026 18:02:21 -0700 (PDT) Received: from jeff-laptop.lan (c-24-7-19-3.hsd1.ca.comcast.net. [24.7.19.3]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-128f62837ccsm506101c88.3.2026.03.12.18.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2026 18:02:20 -0700 (PDT) Message-ID: Subject: Re: Change initdb default to the builtin collation provider From: Jeff Davis To: Robert Haas Cc: pgsql-hackers@postgresql.org Date: Thu, 12 Mar 2026 18:02:19 -0700 In-Reply-To: References: <47e1b4f72fe732c5ae85c6cf2c085b4e99a10120.camel@j-davis.com> <4309879ac305b1cf6b4d7b5fb85bc7b62c6ab768.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1.1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 2026-03-12 at 15:58 -0400, Robert Haas wrote: >=20 >=20 > Back when I wrote web applications, before starting at EDB, this is > the kind of thing that I did all the time, for like ten years > straight. I had plenty of text fields that could have used collate > "C", because they contained things like part numbers or account > numbers or whatever. But anything that contained a person's name or a > company name or any other kind of name that is assigned by humans > rather than generated by a computer could contain any of the > characters that humans use, and should be sorted the way humans like. > And isn't this a totally normal kind of application for somebody to > write? It sure was for me. Yes, I agree that's perfectly normal application. I'm just not sure how useful it is that the index order matches the expected display order by default. While it's plausible that it could benefit from a few indexes with a natural language collation, there are many practical reasons why it might not. And if it's a mix of fields, some of which are ASCII and some natural language, then that's not a particularly strong argument that the indexes should default to natural language. That leaves you unable to use the indexes for prefix search on any field, which is a pretty normal thing to want to do in that kind of application also. I guess what I'm saying is that I agree that users want an appealing final result order. But even assuming that's a requirement, pushing that down into all text indexes by default is a bad trade-off: the cost side is too high, and to see a net performance benefit, there are too many "ifs". Regards, Jeff Davis