m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2026-05-26 18:25:18 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2026-05-26 18:25:18 +0200
commit6f5372bba77f6c070df5ea46d19d95435b7d0f90 (patch)
treed5610c49dfe094e293297dbb1ee925422cb2e945
parent8483429c5c63cdf1d67b4b6d4fbdee6a95852f09 (diff)
Add postgres commands
-rw-r--r--postgres.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/postgres.md b/postgres.md
index 28a0043..ddca2e5 100644
--- a/postgres.md
+++ b/postgres.md
@@ -2,6 +2,17 @@
Default user, db: `postgres`
+## `psql` CLI
+
+ psql <database> <user>
+
+### Meta commands
+
+- `\c[onnect]`: connects to a database, new server (can specify dbname, username,
+host, port, etc., use `-` to leave unspecfied)
+- `\dt`: list tables
+ - There's a bunch of complicated `\d*` commands
+
## User management
Everything should be done as user `postgres`.