Re: Feature request for INITCAP() function
От | Daniel Verite |
---|---|
Тема | Re: Feature request for INITCAP() function |
Дата | |
Msg-id | c7ecbe59-9a76-4e54-ae85-b0dd95c19cab@manitou-mail.org обсуждение исходный текст |
Ответ на | Feature request for INITCAP() function (Jeff Gerbracht <jeffgerbracht@gmail.com>) |
Список | pgsql-general |
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. An ICU collation may produce better results for this: select initcap('blue-green don''t cat''s tail' COLLATE "en-x-icu"); initcap ----------------------------- Blue-Green Don't Cat's Tail With hyphens, it's not clear what the results should be. Looking at the IMDb movies database [1] for instance, titles have a mix of upper and lower case following the hyphen, even within the same english title: Hell-to-Pay Austin The Co-respondent A Pit-boy's Romance A Cowboy's Mother-in-Law Our Parents-In-Law The Good-for-Nothing When the Fire-Bells Rang The post-millennial wave ... [1] https://datasets.imdbws.com/ Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite
В списке pgsql-general по дате отправления: