hasen's tech life

Twitter: @hasen

"no database directory specified and environment variable PGDATA unset"というエラーが出たので.

# "no database directory specified and environment variable PGDATA unset"というエラーが出たので,対応.

# error
$ pg_ctl -l /usr/local/var/postgres/postgres.log start
> pg_ctl: no database directory specified and environment variable PGDATA unset
> Try "pg_ctl --help" for more information.

$ vi ~/.bashrc


$ exec $SHELL -l
$ pg_ctl -l /usr/local/var/postgres/postgres.log start
> server starting

参考: Homebrewを使ったPostgreSQLのインストール(Mac OS Lion)