Re: [HACKERS] ICU integration
От | Peter Geoghegan |
---|---|
Тема | Re: [HACKERS] ICU integration |
Дата | |
Msg-id | CAH2-Wz=Sjf0VnMDQW3PX0BsjH1h2ckBLqih3vS4WktxGhZtSmw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] ICU integration (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
Список | pgsql-hackers |
On Thu, Feb 9, 2017 at 7:58 AM, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > I think I have this sorted out. What I don't understand, however, is > why varstr_abbrev_convert() makes a point of looping until the result of > strxfrm() fits into the output buffer (buf2), when we only need 8 bytes, > and we throw away the rest later. Wouldn't it work to just request 8 bytes? Maybe. We do that because strxfrm() is not required by the standard to produce well defined contents for the buffer when the return value indicates that it didn't fit entirely. This is a standard idiom, I think. > If there is a problem with just requesting 8 bytes, then I'm wondering > how this would affect the ICU code branch. This must be fine with ICU's ucol_nextSortKeyPart(), because it is designed for the express purpose of producing only a few bytes of the final blob at a time. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: