scouting: Document how to connect directly to the database
This patch attempts to teach folks how to use `psql` to connect to the
database. It lets you really easily look at the raw data in the
database.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I05c89a31a3e415b4fc9d2c2e75ed86a80482c0a3
diff --git a/debian/postgresql_amd64.BUILD b/debian/postgresql_amd64.BUILD
index c2f8331..400ab82 100644
--- a/debian/postgresql_amd64.BUILD
+++ b/debian/postgresql_amd64.BUILD
@@ -52,5 +52,6 @@
),
) for binary in (
"postgres",
+ "psql",
"initdb",
)]
diff --git a/scouting/README.md b/scouting/README.md
index 28fdc26..39e1146 100644
--- a/scouting/README.md
+++ b/scouting/README.md
@@ -18,6 +18,15 @@
Wait until the database has fully started up before starting the webserver.
+### Connecting directly to the database
+You can use the `psql` program to look at the contents of the database
+directly.
+```console
+$ bazel run @postgresql_amd64//:psql -- --port=2345 --host=localhost --username=test --dbname=postgres
+
+postgres=# select * from team_match_stats;
+```
+
Running the webserver
--------------------------------------------------------------------------------