3 homepage: https://www.postgresql.org/
5 PostgreSQL: The World's Most Advanced Open Source Relational Database.
14 Use `@x.y.z` for a specific version.
18 > Postgres is the all-in-one database for beginners and experts alike. It
19 > handles SQL, 'NoSQL', JSON, HSTORE, Full-Text Search, Messages Queues and
20 > more. Best bang for buck.
22 ### Start the postgres server
24 Run just once (for development):
27 postgres -D $HOME/.local/share/postgres/var -p 5432
30 Run as a system service on Linux:
33 sudo env PATH="$PATH" \
34 serviceman add --system --username $(whoami) --name postgres -- \
35 postgres -D "$HOME/.local/share/postgres/var" -p 5432
38 ### Connect with the psql client
41 psql 'postgres://postgres:postgres@localhost:5432/postgres'
44 ### Initialize a database with a password
47 echo "postgres" > /tmp/pwfile
48 mkdir -p $HOME/.local/share/postgres/var/
50 initdb -D $HOME/.local/share/postgres/var/ \
51 --username postgres --pwfile "/tmp/pwfile" \
52 --auth-local=password --auth-host=password