Re: tiny step toward threading: reduce dependence on setlocale()

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: tiny step toward threading: reduce dependence on setlocale()
Дата
Msg-id 468dd1fb-20f5-4213-bc70-d1388ccf28fa@proxel.se
обсуждение исходный текст
Ответ на Re: tiny step toward threading: reduce dependence on setlocale()  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: tiny step toward threading: reduce dependence on setlocale()
Список pgsql-hackers
Nice refactoring!

Two small comments about CheckMyDatabase().

- Shouldn't we look at the default_locale.ctype_is_c when setting 
database_ctype_is_c instead of doing a strcmp()? or maybe we should even 
remove the global variable and always look at the default_locale?

- I think that the lookup of Anum_pg_database_datlocale could be done 
later in the code since it is not needed when we use a libc locale. E.g. 
as below.

     if (dbform->datlocprovider == COLLPROVIDER_LIBC)
         locale = collate;
     else
     {
         datum = SysCacheGetAttr(DATABASEOID, tup, 
Anum_pg_database_datlocale, &isnull);
         if (!isnull)
         locale = TextDatumGetCString(datum);
     }

Also is there any reaosn you do not squash th 4th and the 6th patch?

Andreas



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Add ALL_CANDIDATES option to EXPLAIN
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add ALL_CANDIDATES option to EXPLAIN