postgresql client invocation example
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 16 Feb 2020 21:08:16 +0000 (22:08 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 16 Feb 2020 21:35:47 +0000 (22:35 +0100)
Personal favourite to quickly visualise statistics.

barcat

diff --git a/barcat b/barcat
index a571a257a257a3ae5d8e687898eb7a8b45c82ea0..e875d07dfcd25997a747d1ccd9826019c7baa0a7 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -536,6 +536,10 @@ Any kind of database query with counts, preserving returned alignment:
     echo 'SELECT count(*),schemaname FROM pg_tables GROUP BY 2' |
     psql -t | barcat -u
 
+In PostgreSQL from within the client:
+
+       postgres=> SELECT sin(generate_series(0, 3, .1)) \g |barcat
+
 Earthquakes worldwide magnitude 1+ in the last 24 hours:
 
     https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_day.csv |