Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-09 Thread Peter J. Holzer
On 2023-09-06 22:39:42 +0530, Sai Teja wrote: > This column has many sentences for each row in which some of the > characters are in Greek language. > Like µ, ë, ä, Ä etc.. Except for the µ[1], those ̣aren't Greek letters. hp [1] and even that's debatable, since it's a micro sign, not a

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-09 Thread Peter J. Holzer
On 2023-09-06 17:29:21 +0200, Francisco Olarte wrote: > On Wed, 6 Sept 2023 at 16:40, Sai Teja > wrote: > > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 > > the upper method is converting µ as µ only but not as M. > > So, while validating the data we have encountered this

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-07 Thread Joe Conway
On 9/6/23 11:22, Helmut Bender wrote: Am 06.09.23 um 16:04 schrieb Sai Teja: In my local it is windows OS and locale is English_united_states.1252 and in local it is converting as expected ( testµ into TESTµ) You wrote PostgreSQL is hosted on an utf-8 system. That's why it's working different.

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-07 Thread Helmut Bender
Am 06.09.23 um 16:04 schrieb Sai Teja: In my local it is windows OS and locale is English_united_states.1252 and in local it is converting as expected ( testµ into TESTµ) You wrote PostgreSQL is hosted on an utf-8 system. That's why it's working different. And be careful: the M isn't the upp

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Jehan-Guillaume de Rorthais
On Wed, 6 Sep 2023 19:34:40 +0530 Sai Teja wrote: > In my local it is windows OS and locale is English_united_states.1252 and > in local it is converting as expected ( testµ into TESTµ) I'm not familiar with PostgreSQL under Windows. Maybe collation from locale "English_united_states.1252" is av

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
I added one column with generated always column with UPPER CASE like below:- Alter table table_name t add column data varchar(8000) generated always as (UPPER(t.content)) stored Data column is generated always constraint here This column has many sentences for each row in which some of the chara

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 18:37 CEST Erik Wienhold wrote: > Homoglyphs are one explanation if you get 'µass' from the generated column as > described. postgres=# SELECT upper('𝝻𝚊𝚜𝚜'); upper --- 𝝻𝚊𝚜𝚜 (1 row) The codepoints I picked are: * MATHEMATICAL SANS-SERI

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 18:04 CEST Sai Teja wrote: > When I'm trying the below command > Select UPPER('Mass') > I'm getting MASS as output . > But when I created the column with generated always constraint > For example > Alter table xyz add column xyz varchar(800) generated always as > (UPPER(content)) s

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Thank you all for your response. Got one more query, When I'm trying the below command Select UPPER('Mass') I'm getting MASS as output . But when I created the column with generated always constraint For example Alter table xyz add column xyz varchar(800) generated always as (UPPER(content)) store

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Francisco Olarte
On Wed, 6 Sept 2023 at 16:40, Sai Teja wrote: > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the > upper method is converting µ as µ only but not as M. > So, while validating the data we have encountered this problem. > > We want to have the data in both DB's should be sim

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Hi Tom Lane, Thank you for your reply! Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the upper method is converting µ as µ only but not as M. So, while validating the data we have encountered this problem. We want to have the data in both DB's should be similar (db2 and po

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Erik Wienhold
On 06/09/2023 15:42 CEST Sai Teja wrote: > I am using UPPER document name for converting the text from lower case into > upper case. > But here for the below example > Command:- select UPPER(testµ) > Input :- testµ > Output:- TESTM > Expected output :- TESTµ > > Here, that character is converting

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Laurenz Albe
On Wed, 2023-09-06 at 19:34 +0530, Sai Teja wrote: > Actually we are migrating the data from DB2 to postgreSQL. So in DB2 the > upper method is converting µ as µ only but not as M. Then you are using a different collation in DB2, or "upper" (which is not standardized, as far as I know), is defin

Re: postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Tom Lane
Sai Teja writes: > I am using UPPER document name for converting the text from lower case into > upper case. > But here for the below example > Command:- select UPPER(testµ) > Input :- testµ > Output:- TESTM > Expected output :- TESTµ According to https://en.wikipedia.org/wiki/Greek_alphabet the

postgreSQL UPPER Method is converting the character "µ" into "M"

2023-09-06 Thread Sai Teja
Hi team, I am using UPPER document name for converting the text from lower case into upper case. But here for the below example Command:- select UPPER(testµ) Input :- testµ Output:- TESTM Expected output :- TESTµ Here, that character is converting into M which should not be case The postgreSQL i