Re: Initcap works differently with different locale providers
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, pgsql-docs@lists.postgresql.org
Date: 2025-08-04T20:59:45Z
Lists: pgsql-docs
On Mon, 2025-08-04 at 12:30 +0700, Oleg Tselebrovskiy wrote: > First patch just adds this warning about not relying on initcap() > exact > result. The second one is the same, but removes the part "what is a > word" > since it's could be moot because we recommend writing custom > functions, > so understanding what is a word is not exactly needed. Still on the > fence > about which patch is better, though One more thing: we should also change it to "... to upper case (or title case) and the rest to lower case...". Title case is for scripts that have characters like 'Dž' (U+01C5). Other than that I like the second version, which un-documents the specific word boundary rules. I'll admit I'm not quite sure how people use this function in practice, but I expect that it's mostly convenient (or lazy) display. Alexander, is there a reason you backported this change? I don't normally backport doc improvements like this, but I'm not sure what standard others use. The fact that it's on 7 branches makes me more reluctant to commit these extra improvements on top. Can you take care of these follow-up patches? Or, just revert the change and I can make the improvements in master. 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