public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Davis <[email protected]>
To: Robert Haas <[email protected]>
Cc: [email protected]
Subject: Re: Change initdb default to the builtin collation provider
Date: Thu, 12 Mar 2026 18:02:19 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoYGb1Zd+8cAqoW+SvHstgfQs_6xMUg_ueVYdpz4hpaM-A@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CA+TgmobnOn9ipEUcthLmxvv0ZKBWyCcc048qqgqy1X+tszw_Cg@mail.gmail.com>
	<[email protected]>
	<CA+TgmoYPfiz6_QjkiKykwziFDZFzPVf_x77rChYBu=OGVOmbYw@mail.gmail.com>
	<[email protected]>
	<CA+Tgmob7WJ3iETZea=P_eQ2-74q6xE_Vqnz074M5w5VD=dKURA@mail.gmail.com>
	<[email protected]>
	<CA+TgmoYGb1Zd+8cAqoW+SvHstgfQs_6xMUg_ueVYdpz4hpaM-A@mail.gmail.com>

On Thu, 2026-03-12 at 15:58 -0400, Robert Haas wrote:
> 
> 
> 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






view thread (16+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Change initdb default to the builtin collation provider
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox