summaryrefslogtreecommitdiffstats
path: root/software/postgres.page
blob: bdb01d83100625d7e5e12af761a6aaa53677a6e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Start a quick local docker database:

    docker run -p 5432:5432 postgres:latest

Connect (from outside):

    psql -h localhost -w postgres

Dump current schema with something like:

    docker exec 6a018d9d8ef0 pg_dump -U postgres postgres -s | rg -v ^- > schema.sql

Basic status from the psql command line:

    \l+     (list databases)
    \dt+    (describe table)