Skip site navigation (1) Skip section navigation (2)

Re: locale changes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: pgsql-patches <pgsql-patches(at)postgreSQL(dot)org>
Subject: Re: locale changes
Date: 2000-07-20 15:16:23
Message-ID: 24879.964106183@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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
of the data is different.  Even if the btree code doesn't crash and burn
completely, it will fail to find stuff it should have found and/or
insert new items at positions that will be wrong after the next LOCALE
change.

Not only is on-the-fly LOCALE change not acceptable, but we really
ought to be recording the LOCALE settings at initdb time and forcing the
postmaster to adopt them when it starts up.  Right now you can shoot
yourself in the foot if you don't start the postmaster with the same
LOCALE every time.

Someday we may support per-column LOCALE settings, but it's not likely
ever to be safe to change LOCALE on the fly.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2000-07-20 15:17:59
Subject: Re: [HACKERS] 8Ko limitation
Previous:From: Tom LaneDate: 2000-07-20 15:08:42
Subject: Re: Loading binary data into the database

pgsql-patches by date

Next:From: Karel ZakDate: 2000-07-20 15:31:01
Subject: Re: locale changes
Previous:From: Karel ZakDate: 2000-07-20 12:18:59
Subject: locale changes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group