Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8474600

Browse files
committed
Hello!
Attached is new README.locale. Should go into .../doc. Includesinstructions on how to install and use Multibyte support. Primarilyoriented toward Russian (Cyrillic) users.Oleg.---- Oleg Broytmannhttp://members.xoom.com/phd2/ phd2@earthling.net Programmers don't die, they just GOSUB without RETURN.
1 parent35d70e9 commit8474600

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

‎doc/README.locale

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,86 @@
1+
===========
2+
14 Apr 1999
3+
===========
14

5+
Tatsuo Ishii <t-ishii@sra.co.jp> updated Multibyte support extending it
6+
to Cyrillic language. Now PostgreSQL supports KOI8-R, WIN-1251, ISO8859-5
7+
and CP866 (ALT) encodings.
8+
9+
Short instruction on using this feature follows. Longer discussion of
10+
Multibyte support is in README.mb.
11+
12+
WARNING! Now with Multibyte support Cyrillic RECODE declared obsolete
13+
and will be removed from Postgres. If you are using RECODE consider
14+
switching to Multibyte support.
15+
16+
Instructions on how to prepare Postgres for Cyrillic Multibyte support.
17+
----------------------------------------------------------------------
18+
19+
First, you need to backup all your databases. I recommend to backup the
20+
entire Postgres directory, including binaries and libraries - thus you can
21+
easily restore if something goes wrong.
22+
23+
Dump you data: pg_dumpall > dump.db
24+
25+
Stop postmaster.
26+
27+
Configure, compile and install Postgres. (I'll mostly talk about KOI8-R
28+
encoding, this is just to make examples a little more clear; you can use
29+
any supported encoding.)
30+
31+
cd src
32+
./configure --enable-locale --with-mb=KOI8
33+
make
34+
make install
35+
36+
Make sure you've backed up your databases. Doublecheck your backup. I
37+
really mean it - make regular backups and test your backups sometimes by
38+
fake restore.
39+
40+
Remove your data directory (better, rename or move it).
41+
42+
Run initdb saying your primary encoding: initdb -e KOI8. If you omit
43+
encoding, primary encoding from configure will be taken.
44+
45+
Start postmaster.
46+
47+
Create databases: createdb -e KOI8. Again, you can omit encoding -
48+
default encoding will be used. You are not forced to use the same encoding
49+
for all your databases - you can create different databases with different
50+
encodings.
51+
52+
Load your data from the dump you've created: psql < dump.db
53+
54+
That's all! Now you are ready to enjoy the full power of Multibyte
55+
support.
56+
57+
To use Multibyte support you do not need to do something special - just
58+
execute your queries. If client program does not set encoding, it will get
59+
the data in database encoding. But client may ask Postgres to do automatic
60+
server-to-client and client-to-server conversions. There are 2 (two) ways
61+
client program declares its encoding:
62+
1) client explicitly executes the query SET CLIENT_ENCODING TO 'win';
63+
2) client started with environment variable set. Examples -
64+
using sh syntax:
65+
PGCLIENTENCODING='win'; export PGCLIENTENCODING
66+
using csh syntax:
67+
setenv PGCLIENTENCODING 'win'
68+
69+
Setting PGCLIENTENCODING even if you use same client encding as the
70+
database would omit an overhead of asking the database encoding while
71+
initiating the connection, so it is good idea to set it in any case.
72+
73+
Now you may run test suite and see Multibyte support in action. Go to
74+
.../src/test/locale and run
75+
make clean all test-koi2win
76+
77+
78+
===========
279
1998 Nov 20
80+
===========
381

4-
I extended locale support. Now ORDER BY (if PostgreSQL configured with
82+
I extended locale support, originally written by Oleg Bartunov
83+
<oleg@sai.msu.su>. Now ORDER BY (if PostgreSQL configured with
584
--enable-locale) uses strcoll() for all text fields: char(n), varchar(n),
685
text.
786

@@ -13,5 +92,3 @@ the regression test because not so much people require locale support. Read
1392
(lockhart@alumni.caltech.edu) for hints, tips, help and discussion.
1493

1594
Oleg.
16-
----
17-
Oleg Broytmann http://members.tripod.com/~phd2/ phd2@earthling.net

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp