Re: locale changes

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgreSQL(dot)org>
Subject: Re: locale changes
Date: 2000-07-20 15:31:01
Message-ID: Pine.LNX.3.96.1000720172144.11997S-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


On Thu, 20 Jul 2000, Tom Lane wrote:

> Karel Zak <zakkr(at)zf(dot)jcu(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-07-20 15:39:14 Re: Hello PL/Python
Previous Message Adriaan Joubert 2000-07-20 15:24:57 Re: Loading binary data into the database

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2000-07-20 15:48:52 Re: locale changes
Previous Message Tom Lane 2000-07-20 15:16:23 Re: locale changes