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 defined differently there.

> 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 postgreSQL)
> 
> 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µ)
> 
> So, even I want to change locale i cannot change now. Since already db is 
> created. BTW this db is hosted in azure.
> 
> Would request to please suggest if any alternatives are there to resolve this 
> issue. 

Specify a collation that does what you want explicitly:

SELECT upper('testµ' COLLATE "C");

 upper 
═══════
 TESTµ
(1 row)

But then don't complain if your "ö" and "é" are not uppercased either.

Yours,
Laurenz Albe


Reply via email to