Re: Collation rules and multi-lingual databases - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Collation rules and multi-lingual databases
Date
Msg-id 874r08goci.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Collation rules and multi-lingual databases  (Joe Conway <mail@joeconway.com>)
Responses Re: Collation rules and multi-lingual databases
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Header files installed for contrib modules?
Next
From: Dave Cramer
Date:
Subject: ambiguous sql states