Re: Initcap works differently with different locale providers
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Peter Eisentraut <peter@eisentraut.org>, Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, pgsql-docs@lists.postgresql.org
Date: 2025-08-06T18:21:15Z
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
Commits
-
Further clarify documentation for the initcap function
- f8ce9ed220b5 19 (unreleased) landed
-
Revert "Clarify documentation for the initcap function"
- 0edaaa8f2978 14.19 landed
- 06633271ec40 13.22 landed
- 098c27dee4c1 15.14 landed
- b862465dba33 16.10 landed
- 3b3aa1f651c7 17.6 landed
- 2ae8280d16c9 18.0 landed
-
Clarify documentation for the initcap function
- 907ac2ca30bb 13.22 landed
- 276b022ec05b 14.19 landed
- 9af075c4e27e 15.14 landed
- d861b9282261 16.10 landed
- 3c05d4d3433e 17.6 landed
- 1fe9e3822c4e 18.0 landed
- c2c2c7e22566 19 (unreleased) landed