開発日記 postgres編 ~コマンド忘れないように~
コマンドメモメモ
まずpostgresqlがパッケージ版とbrewの2つインストールされていないか注意。
以下brew版です。
postgresqlを起動する
brew services start postgresql
postgresqlを停止する
brew services stop postgresql
起動しているか確認する。
brew services list
postgresqlのバージョンを確認する。
psql --version
dockerでpostgresqlを起動後 実行する。
docker exec -it [containerID or containerName] psql -U postgres