postgresql备忘录(debian)

过两天再加注释

1
$ apt install postgresql postgresql-client
1
2
3
$ sudo pg_ctlcluster 12 main start
$ sudo -u postgres bash
$ psql # or psql postgres
1
2
3
4
5
$ 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
1
pg_lsclusters

creativ common license