Today, when I sorted out the data, I found that the Postgre version was used directly to understand compression, and The for expert only.
For the purpose of testing, a copy of sql-8.3.3-1-binaries-no-installer.zip is directly downloaded from the official website.
1. decompress it to d: \ pgsql8.3.3
2. Set the environment variable. I don't want to add it directly, but write it to a batch file named pgenv. bat.
Set PGHOME = d: \ pgsql8.3.3
Set PATH = % PGHOME % \ bin; % path %
Set PGHOST = localhost
Set PGLIB = % PGHOME % \ lib
Set PGDATA = % PGHOME % \ data
3.
Run pgenv. bat
Then:
D: \ pgsql8.3.3 \ bin> initdb
* Is the file host of this database system "******".
This user must also be the host of the server process.
The database cluster will be initialized with locale Chinese_People 'S Republic of China.936.
Initdb: locale Chinese_People 'S Republic of China.936 requires unsupported encod
Ing GBK
Encoding GBK is not allowed as a server-side encoding.
Rerun initdb with a different locale selection.
It seems that cp936, GBK, and dizzy are not directly supported. Therefore, execute:
D: \ pgsql8.3.3 \ bin> initdb -- locale = zh_CN
Initdb: Invalid locale name "zh_CN"
Initdb: Invalid locale name "zh_CN"
Initdb: Invalid locale name "zh_CN"
Initdb: Invalid locale name "zh_CN"
Initdb: Invalid locale name "zh_CN"
Initdb: Invalid locale name "zh_CN"
The file host that belongs to this database system is the user "hex ".
This user must also be the host of the server process.
The database cluster will be initialized with locale Chinese_People 'S Republic of China.936.
Initdb: locale Chinese_People 'S Republic of China.936 requires unsupported encod
Ing GBK
Encoding GBK is not allowed as a server-side encoding.
Rerun initdb with a different locale selection.
Or not, replace it with the following:
D: \ pgsql8.3.3 \ bin> initdb -- locale = C
The file host that belongs to this database system is the user "hex ".
This user must also be the host of the server process.
The database cluster will be initialized with locale C.
The default database encoding has been set to SQL _ASCII.
The default text search configuration will be set to "english ".
Directory d:/pgsql8.3.3/data... created successfully
Creating subdirectories... successful
Select the default maximum number of connections (max_connections)... 100
Selecting default shared_buffers/max_fsm_pages... 32 MB/204800
Configuration File Created...
The template1 database is created in d:/pgsql8.3.3/data/base/1...
Initializing pg_authid... successful
Initializing dependencies... successful
System View created...
Loading system objects 'descriptions... successful
Character Set conversion... created
Creating dictionaries... successful
Permission set for internal object... successful
Information Mode created...
The database template1 is cleared...
Template1 is copied to template0...
Copying template1 to copying s... successful
Warning "trust" authentication is enabled for the local connection.
You can modify pg_cmd.conf or
Use the-A option when running initdb.
Success. You can now start the database server using:
"S"-D "d:/pgsql8.3.3/data"
Or
"Pg_ctl"-D "d:/pgsql8.3.3/data"-l logfile start