我确定这个问题已经有答案了,但我似乎找不到答案。
我使用Homebrew安装了postgresql (brew install postgresql),它被安装在/usr/local/Cellar/postgresql下。然后按照说明,我做了以下事情:
If this is your first install, create a database with:
initdb /usr/local/var/postgres
据我所知,initdb会创建一个新的数据库集群。因此,当我执行上述操作时,“postgres”是数据库名称和数据库本身,还是所有postgresql数据库都需要的必要部分?
实际的数据库存放在哪里?我对postgresql很陌生,正在寻找一个文件或二进制文件来表示数据库。那么,数据库在哪里,当我创建一个新数据库时它会去哪里?