Re: Initcap works differently with different locale providers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Oleg Tselebrovskiy <o(dot)tselebrovskiy(at)postgrespro(dot)ru>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Initcap works differently with different locale providers
Date: 2025-08-06 18:21:15
Message-ID: d06df07830f2f34d3aae908bb3ed2c36b098399e.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wed, 2025-08-06 at 13:44 +0200, Peter Eisentraut wrote:
> It's meant to be an Oracle-compatible function, so maybe someone can
> check there for some details.

If it's purely a compatibility function, then using ICU's sophisticated
word break iterator doesn't make sense.

> https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/INITCAP.html
>
> I think we should try to document the behavior more precisely.

I don't think ICU purely follows Unicode on this point (does it?), so
we'd have to point to the ICU documentation.

>   But we
> probably first have to agree what it should be.

I still don't fully understand the use case here. I've used the
function a few times to assemble a few strings into a page heading, but
that was some time ago so I don't even clearly remember my use case. It
seems plausible there are quite a few people doing something similar,
and they'd benefit from ICU's more sophisticated approach.

But if the primary use case is for compatibility, then we might be
trying to hard to make this a provider-specific feature.

>
> Yes, I was not in favor of backpatching this, since it was not a bug
> fix.  And it turns out it was incomplete.  I think we should revert
> all
> the backpatches and iterate on getting the documentation the way we
> want
> in master.

+1.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-08-07 06:22:44 Duplicated name of subsection 29.5.1
Previous Message Alexander Korotkov 2025-08-06 14:13:15 Re: Initcap works differently with different locale providers