Sample
-
Activate nix env
nix-shell --pure shell.nix
-
Start up postgresql (
sh setup-postgres
)-
Init db
initdb -D /tmp/mydb
-
Start postgres processes
pg_ctl -D /tmp/mydb -l ./mydb.log -o "--unix_socket_directories='/tmp'" start
-
Create db
createdb -h /tmp mydb
-
-
Connect to postgresql
psql -h localhost -d mydb