Re: Collation again here

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Rihad" <grihad(at)gmail(dot)com>
Cc: Dominique Devienne <ddevienne(at)gmail(dot)com>, pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Collation again here
Date: 2026-01-08 16:12:06
Message-ID: 61b32afa-14f9-41c5-9be0-635acc90bc48@manitou-mail.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rihad wrote:

> Looking into pg_collation system table that collation has
> collprovide="c". First I thought "c" meant libc, but this article states
> that "c" means PG Internal provider, and libc would have been "l".
>
> https://medium.com/@adarsh2801/understanding-collations-in-postgresql-648e4fa333e1
>
> 1. */PostgreSQL Internal Provider (‘c’) /*: Introduced in Postgres 15.
> This built-in collation support is System/OS agnostic.
> 2. */System Library Provider (‘l’) : /*Uses GNU C library and hence is
> OS locale dependent.
> 3. */ICU — International Components for Unicode (‘i’) : /*Uses ICU
> library for unicode-aware collation.

Well, this is quite wrong!

See the doc at [1]:
<quote>
datlocprovider char
Locale provider for this database: b = builtin, c = libc, i = icu
</quote>

Also, the builtin provider has been introduced in pg17, not 15,
and 'l' has never been used in this field.

It looks like hallucination from an AI model.

Quickly reading the rest of the article, it's a mix of good points
and very confusing assertions that would not be expected
from a person proficient in the domain
(for example: writing that en_us.UTF-8 is "case-insensitive")

Unfortunately nowadays AI slop proliferates, so we need
to be extra cautious on posts from untrusted sources.

[1]: https://www.postgresql.org/docs/current/catalog-pg-database.html

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2026-01-08 16:43:23 Not seeing script error
Previous Message Adrian Klaver 2026-01-08 16:04:56 Re: Collation again here