postgresql备忘录(debian)

过两天再加注释

$ apt install postgresql postgresql-client
$ sudo pg_ctlcluster 12 main start
$ sudo -u postgres bash
$ psql # or psql postgres
$ adduser mypguser #optional, you can use your existing user
$ sudo -u postgres bash
$ createuser --pwprompt mypguser $ you will input your password here
$ createdb -O mypguser mypgdatabase $optional, you can use existing db, like postgres as default
$ psql mypgdatabase
pg_lsclusters

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)