(在postgres用户权限下执行命令)
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\pgsql>bin\initdb.exe -D data -E EUC_CN --locale=C -A md5 -U admin-W
属于此数据库系统的文件宿主为用户 "postgres".
此用户也必须为服务器进程的宿主.
数据库簇将带有 locale C 初始化.
The default text search configuration will be set to "english".
创建目录 data ... 成功
creating subdirectories ... 成功
选择默认最大联接数 (max_connections) ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
创建配置文件 ... 成功
在 data/base/1 中创建 template1 数据库 ... 成功
initializing pg_authid ... 成功
输入新的超级用户口令:adminpassword
再输入一遍:adminpassword
设置口令 ... 成功
initializing dependencies ... 成功
创建系统视图 ... 成功
loading system objects' descriptions ... 成功
创建字符集转换 ... 成功
creating dictionaries ... 成功
对内建对象设置权限 ... 成功
创建信息模式 ... 成功
清理数据库 template1 ... 成功
拷贝 template1 到 template0 ... 成功
copying template1 to postgres ... 成功
Success. You can now start the database server using:
"bin\postgres" -D "data"
or
"bin\pg_ctl" -D "data" -l logfile start
C:\pgsql>bin\pg_ctl.exe -D data -l logfile start
server starting
C:\pgsql>bin\pg_ctl.exe -D data stop
waiting for server to shut down.... 完成
server stopped
C:\pgsql>