1.编译完成后,安装数据库
在d盘创建文件夹:pg_debug
在../src/tools/msvc/下安装pg到pg_debug
perl install.pl d:/pg_debug
2.创建数据库
initdb -D ../data --no-locale
3.启动服务器
postgres -D ../data
出现Execution of PostgreSQL by a user with administrative permissions is not permitted.
注意:pg默认不允许Administrator 执行Postgres.exe 怎么办?请看4
4.修改代码,允许administrator执行postgres.exe
打开源代码D:/pgsql846/src/backend/main/main.c
大约在157行找到
check_root(progname);
把这条给注释掉,重新编译,安装,然后再跳到第3步。
5.启动数据库服务器
postgres -D ../data
6.创建数据库
createdb test
7.登陆数据库test
psql test
ok! that all!