On Thu, 20 Jul 2000, Tom Lane wrote:
> Karel Zak <zakkr@zf.jcu.cz> writes:
> > Now, possible is change locale environment from client without backend
> > restart and under one postmaster can run more backends with different
> > locale setting.
>
> No, no, NOOOOO!!!!
>
> This *will* destroy your database.
>
> Think about indexes on text columns. Change LOCALE, now the sort order
But, it is solvable, I save original start-up setting to serarate struct
that is never changed. All routines that can allow on-the-fly locale change
can use change-able structs and index (..etc.) can use original setting.
Now, locale (on-the-fly change-able locale) use formatting.c and money (may
be), all others routines can use start-up setting.
For example:
change_to_on_the_fly_locale_setting()
to_char();
set_original_locale();
... and SET LOCALE can be used for specific routines only.
Comments?
But, yes this solution is not in my patch.
Karel