Re: Fault with initcap

Поиск
Список
Период
Сортировка
От Shaozhong SHI
Тема Re: Fault with initcap
Дата
Msg-id CA+i5JwZ1K83K-TMsz7T=o2jQ+=2VcUKp-bh3VxH-j-HBjhSxpw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fault with initcap  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Fault with initcap
Список pgsql-general


On Tue, 12 Oct 2021 at 23:02, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 10/12/21 13:50, Shaozhong SHI wrote:
>
>
> On Tue, 12 Oct 2021 at 20:34, Adrian Klaver <adrian.klaver@aklaver.com

>
>     Which follows the definition here:
>
>     https://www.postgresql.org/docs/14/functions-string.html
>     <https://www.postgresql.org/docs/14/functions-string.html>
>
>     initcap ( text ) → text
>
>     Converts the first letter of each word to upper case and the rest to
>     lower case. Words are sequences of alphanumeric characters separated by
>     non-alphanumeric characters.
>
>     Hi, Adrian Klaver,
>
>
> It looks like that you replicated the error.

There is no error, initcap is doing what it is documented to.

notemachine is not two words anymore then 'online', 'bluebell',
'network' are.


>
> There must be a way to do the following.

Maybe, but as Karsten says it would involve an AI. One that understands
the mutt language that is English.

>
> a column contains a list of words.  Only the first letter of each word
> should be capitalised.  INITCAP can not do that.  How to create a
> function just to capitalised each word (substring) in a list of
> words/strings.  This will be very useful and create great impact.

 From here:

https://www.grammarly.com/blog/14-of-the-longest-words-in-english/

uncopyrightable

where would you split that into words?:

Some 'words' I see:

un
unc
copy
copyright
right
table
able

>
> Regards,
>
> David


--
Adrian Klaver
adrian.klaver@aklaver.com

Hi, Adrian Klaver,

In Python, there is  a capwords.  Do we have an equivalent in Postgres?
Regards, David 

В списке pgsql-general по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Avg/max size of these JSON docs in Postgres
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Fault with initcap