我如何在我的Mac上pipe理Postgress?

我已经安装了它。 我看到它正在运行。 我只是不知道如何阻止它。 或者重新开始。

网上有什么好的参考资料? 我发现的是我必须支付的pipe理员应用程序。

我打算假设你使用macports安装它。 像sudo端口安装postgresql84-服务器

通常,要“激活”服务器,你需要运行类似的东西

sudo -u postgres /opt/local/lib/postgresql84/bin/initdb /opt/local/var/db/postgresql84/defaultdb/ 

创build数据库目录。 然后使用

 launchctl load -w /opt/local/etc/LaunchDaemons/org.macports.postgresql84-server/org.macports.postgresql84-server.plist 

要closures它,请使用

 launchctl unload -w /opt/local/etc/LaunchDaemons/org.macports.postgresql84-server/org.macports.postgresql84-server.plist 

通常在完成构build和安装后,macports会告诉你这些事情。

最后,要使用它,你通常要把它放到你的path中:

 export PATH=$PATH:/opt/local/lib/postgresql84/bin 

然后你可以使用正常的命令,比如

 createuser my_user createdb -O my_user my_database psql -U postgres 

它是从launchd开始的吗? 如果是这样的话,那么man launchctl就是你的朋友。

pgadminIII是一个很好的pipe理工具。 它是免费的。

http://www.pgadmin.org/download/macosx.php

它不允许你启动和停止服务器,但它是一个开始而不必知道DDL语句的好方法。 查看数据和运行即席查询也非常好。