diff options
Diffstat (limited to 'software/postgres.page')
-rw-r--r-- | software/postgres.page | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/software/postgres.page b/software/postgres.page new file mode 100644 index 0000000..bdb01d8 --- /dev/null +++ b/software/postgres.page @@ -0,0 +1,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) |