Re: Collation rules and multi-lingual databases

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Collation rules and multi-lingual databases
Дата
Msg-id 874r08goci.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: Collation rules and multi-lingual databases  (Joe Conway <mail@joeconway.com>)
Ответы Re: Collation rules and multi-lingual databases  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:

> >   if (sigsetjmp(Warn_restart, 1) != 0)
> >   {
> >     memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
> >     newlocale = setlocale(LC_COLLATE, oldlocale);
> >     if (!newlocale)
> >       elog(PANIC, "setlocale failed to reset locale: %s", localestr);
> >     siglongjmp(Warn_restart, 1);
> >   }

Well presumably we want FATAL not PANIC.

And do we still need HOLD_INTERRUPTS() .. RESUME_INTERRUPTS() ?

I was afraid that was getting into bed too much with the error handling. I
have an implementation that restores the locale around the palloc and
increases the initial guess for future calls to avoid degenerate behaviour.
I'm not sure which approach is preferable.

-- 
greg



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Header files installed for contrib modules?
Следующее
От: Dave Cramer
Дата:
Сообщение: ambiguous sql states