Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings
От | Peter Eisentraut |
---|---|
Тема | Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings |
Дата | |
Msg-id | 313838f0-49be-17cb-a812-ab14ee9e8ff9@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] strcmp() tie-breaker for identical ICU-collated strings (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 6/9/17 10:31, Robert Haas wrote: > + * In some locales strcoll() can claim that nonidentical strings are > + * equal. Believing that would be bad news for a number of reasons, > + * so we follow Perl's lead and sort "equal" strings according to > + * strcmp(). > > Again, however, the reasons why believing it would be bad news are not > enumerated. It is merely asserted that there is more than one such > reason. I suspect that there were just issues that haven't been thought through yet, including hashing. More generally, the code's receptiveness to internationalization issues is ever expanding. Early code probably also thought that using multibyte characters or non-C locales was bad news. Over time, we have worked those issues out. This might be just be one more. > So, what's special about text that it can never report two > non-byte-for-byte values as equal? And could we consider changing > that, so that users can select an ICU collator and get exactly the > behavior ICU delivers, without the extra tiebreak? I don't think there is anything special. We just need to work through the details. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: