Re: Locale timings
От | Tom Lane |
---|---|
Тема | Re: Locale timings |
Дата | |
Msg-id | 16270.1006820475@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Locale timings (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > However, I feel that we could reasonably cope with this situation by > replacing > #ifdef USE_LOCALE > /* locale-aware code */ > #else > /* non-locale code */ > #endif > with > if (locale_is_not_C) > { > /* locale-ware code */ > } > else > { > /* non-locale code */ > } > This practice should have minuscule impact, Except perhaps on the size of the executable ;-). However, USE_LOCALE affects little enough stuff that that's probably not a big objection. A possibly more serious objection is whether there are still any systems out there that don't *have* locale support, and will give us build errors on <locale.h> or strcoll() or some such. It looks like <locale.h> is required by ANSI C, so I think we can get away with this; does anyone still care about, eg, SunOS 4.1.x? (One could imagine providing a stub implementation that equates strcoll() to strcmp() and so forth, if anyone still does care.) One nice point is that this will actually make things faster for the case of locale-enabled-code-running-in-C-locale, which I suspect is not uncommon, particularly for RPM users. I'm for it ... regards, tom lane
В списке pgsql-hackers по дате отправления: