Re: locale changes - Mailing list pgsql-patches

From Karel Zak
Subject Re: locale changes
Date
Msg-id Pine.LNX.3.96.1000720172144.11997S-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: locale changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: locale changes
List pgsql-patches
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





pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: locale changes
Next
From: Tom Lane
Date:
Subject: Re: locale changes