From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Shaozhong SHI <shishaozhong(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fault with initcap |
Date: | 2021-10-12 22:02:55 |
Message-ID: | 157d10c3-a683-3373-3550-06113149cc51@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On 10/12/21 13:50, Shaozhong SHI wrote:
>
>
> On Tue, 12 Oct 2021 at 20:34, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2021-10-12 22:07:11 | Re: Avg/max size of these JSON docs in Postgres |
Previous Message | Karsten Hilbert | 2021-10-12 21:09:40 | Re: Fault with initcap |
From | Date | Subject | |
---|---|---|---|
Next Message | Shaozhong SHI | 2021-10-12 23:03:07 | Re: Fault with initcap |
Previous Message | Karsten Hilbert | 2021-10-12 21:09:40 | Re: Fault with initcap |