Re: String comparison problem in select - too many results

2018-01-15 Thread Durumdara
Dear Peter and Francisco! Firstly: sorry for name change. I might read too many about Totti or I was listening too many "Vamos a la playa" spanitaliano disco... :-) :-) :-) To better understand my problem I write about the background. We used different database engine "before" PG, and more codes

Re: String comparison problem in select - too many results

2018-01-14 Thread Peter J. Holzer
On 2018-01-14 13:20:05 +0100, Francisco Olarte wrote: > On Sun, Jan 14, 2018 at 12:14 PM, Peter J. Holzer wrote: > > On 2018-01-12 11:08:39 +0100, Francisco Olarte wrote: > >> C collation is like sorting raw bytes, it doesn't event sort > >> upper/lower case correctly > > > > Now you are falling i

Re: String comparison problem in select - too many results

2018-01-14 Thread Francisco Olarte
On Sun, Jan 14, 2018 at 12:14 PM, Peter J. Holzer wrote: > On 2018-01-12 11:08:39 +0100, Francisco Olarte wrote: >> C collation is like sorting raw bytes, it doesn't event sort >> upper/lower case correctly > > Now you are falling into the same trap as Durumdara, calling an > unintended sort order

Re: String comparison problem in select - too many results

2018-01-14 Thread Peter J. Holzer
On 2018-01-12 11:08:39 +0100, Francisco Olarte wrote: > C collation is like sorting raw bytes, it doesn't event sort > upper/lower case correctly Now you are falling into the same trap as Durumdara, calling an unintended sort order "not correct" ;-). C collation is certainly not what a "normal us

Re: String comparison problem in select - too many results

2018-01-12 Thread Francisco Olarte
Durumdara: On Thu, Jan 11, 2018 at 1:23 PM, Durumdara wrote: > Dear Francesco! FrancIsco, with an I, Spanish, not Italian. > My "bug" is that I commonly used Windows environment where the default > collation is ANSI, based on Windows language which is Hungarian here > (Windows1250). I'm not s

Re: String comparison problem in select - too many results

2018-01-11 Thread Durumdara
Dear Francesco! My "bug" is that I commonly used Windows environment where the default collation is ANSI, based on Windows language which is Hungarian here (Windows1250). But because of special characters we used UTF8 to store data in database. I supposed that UTF8.hu_HU is working like local natu

Re: String comparison problem in select - too many results

2018-01-11 Thread Francisco Olarte
On Thu, Jan 11, 2018 at 9:57 AM, Durumdara wrote: > I tried in in different servers, different databases. > 1.) Windows local PG: LC_COLLATE = 'Hungarian_Hungary.1250' - ok. > 2.) Linux remote PG: LC_CTYPE = 'en_US.UTF-8' - also wrong!!! - UTF > problem??? Your problem seems to be you consider w

Re: String comparison problem in select - too many results

2018-01-11 Thread Durumdara
Dear David! I tried in in different servers, different databases. 1.) Windows local PG: LC_COLLATE = 'Hungarian_Hungary.1250' - ok. 2.) Linux remote PG: LC_CTYPE = 'en_US.UTF-8' - also wrong!!! - UTF problem??? 3.) Forcing C collation: - ok 4.) Replace '/' to 'A': - ok select replace('18/0113'

Re: String comparison problem in select - too many results

2018-01-10 Thread David G. Johnston
On Wednesday, January 10, 2018, Durumdara wrote: > > The PG is 9.4 on Linux, the DataBase encoding is: >ENCODING = 'UTF8' >LC_COLLATE = 'hu_HU.UTF-8' >LC_CTYPE = 'hu_HU.UTF-8' > > The collection rules for hu_HU.UTF-8 probably pretend symbols don't exist, this is not uncomm