Added extra examples of queries.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 10 Dec 2019 19:31:15 +0200
changeset 2391 aedbd074ec54
parent 2390 f2b450fa4f4b
child 2392 eddb9a8153b5
Added extra examples of queries.
postgres.rst
--- a/postgres.rst	Thu Nov 14 01:12:40 2019 +0200
+++ b/postgres.rst	Tue Dec 10 19:31:15 2019 +0200
@@ -202,9 +202,13 @@
   SELECT current_user;
   SELECT session_user;
 
-::
+Active sessions and queries::
+
+  select * from pg_stat_activity;
 
-   select * from pg_stat_activity;
+  select * from pg_stat_activity
+  order by usename;
+
 
 https://www.postgresql.org/docs/current/monitoring-stats.html
   The Statistics Collector.
@@ -249,6 +253,7 @@
 
   \dt
   SELECT table_schema, table_name FROM information_schema.tables ORDER BY table_schema, table_name;
+  SELECT * FROM pg_class;
 
 or in all schemas::