Hi!

On 08-Jul-99 Oleg Broytmann wrote:
> Hi!
> 
> On Thu, 8 Jul 1999 [EMAIL PROTECTED] wrote:
>> Can user choose its locale while fetching data from postgresql (6.5)?
> 
>    Sure! Not only locale, but KOI8<=>CP12521 converting on th fly!!!
>> What I mean:
>> 
>> I have PGSQL in multiuser environment. As ususal in russia some users prefer
>> KOI8-R but other prefer CP-1251 code pages... :-( 
>> Sounds good to make SET CODEPAGE='...' operator to change PGSQL senntings by
>> user at each user session. Is it possible? How?
> 
>    Look into doc directory. Read details about compiling and using Postgres
> with Multibyte support. There are even special instructions for cyrillic
> users.

yeah.. I read dox. So as I understand correctly:
- I can set locale via environment as LC_CTYPE etc...
- I can set source code page via $PG_DATA/charset.conf
- I can set charset for clients via $PG_DATA/charset.conf by client's IP
Is what all?
All of above I can change only restarting postgres :-(
I can't change code page for conversion by server IP.
I can't change client code page for conversion DYNAMICALLY (via SET command 4x).

I explain by example:
I have www-host with some users. Some of them use koi8 and other use cp-1251 as
source cp. I cant select them by IP! They are DIALUP users with dynamic IP! I
prefer host cp as koi, well... I happy that koi->windows conversion is
possible. Best way I see is to permit windows user use the command like
SET charset=win
to enable koi->win translation. As I understand he can exec this command once
per connection. Because we support persistent connections should be command
SET charset=koi
too ;-)

My problem is:
I cant guess that charset the client use...

SKiller
--------------------------
Sergei Keler
WebMaster of "ComSet"
E-Mail: [EMAIL PROTECTED]
http://www.comset.net
--------------------------

Reply via email to