Search Postgresql Archives

Re: Feature request for INITCAP() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-11-30 at 21:08 -0500, Jeff Gerbracht wrote:
> It would be great if there was a way to set exceptions to the 'word' delimiter list used in
> the INITCAP() function.    For example, I have hyphenated words like blue-green or
> possessives and contractions like don't and cat's tail
> These become Blue-Green, Don'T and Cat'S Tail.
> 
> Being able to pass in a set of delimiter exceptions like hyphen and single quote would make
> this function much more useful for our specific use cases.

That would pretty quickly drift into locale-dependent rules.  Such a function would be even
more special-case than the current "initcap()", which is already pretty specific to certain
languages.  I don't know if there is enough value for the general public in it.

But it should be easy to implement it yourself, for example in PL/pgSQL.  Why don't you
try that?

Yours,
Laurenz Albe






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux