Re: Regular expression to UPPER() a lower case string - Mailing list pgsql-general

From Gianni Ceccarelli
Subject Re: Regular expression to UPPER() a lower case string
Date
Msg-id 20221210134420.247e7a3a@nautilus
Whole thread Raw
In response to Re: Regular expression to UPPER() a lower case string  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Responses Re: Regular expression to UPPER() a lower case string
List pgsql-general
On 2022-12-10 "Peter J. Holzer" <hjp-pgsql@hjp.at> wrote:
> > * your logic only works by accident for some languages (try to
> > upcase a `ß` or a `ı`)
>
> This is also true of upper() and lower() and SQL does provide those.

Well…

> select upper('ı');
┌───────┐
│ upper │
├───────┤
│ I     │
└───────┘
(1 row)

> select upper('ß');
┌───────┐
│ upper │
├───────┤
│ ß     │
└───────┘
(1 row)

> select upper('ä');
┌───────┐
│ upper │
├───────┤
│ Ä     │
└───────┘
(1 row)

Of course all of this is dependent of locale, too.

--
    Dakkar - <Mobilis in mobile>
    GPG public key fingerprint = A071 E618 DD2C 5901 9574
                                 6FE2 40EA 9883 7519 3F88
                        key id = 0x75193F88




pgsql-general by date:

Previous
From: Eagna
Date:
Subject: Re: Regular expression to UPPER() a lower case string
Next
From: Gianni Ceccarelli
Date:
Subject: Re: Regular expression to UPPER() a lower case string