summaryrefslogtreecommitdiffstats
path: root/pg.h
diff options
context:
space:
mode:
authorMark Wong <markwkm@gmail.com>2007-10-05 15:59:02 -0700
committerMark Wong <markwkm@gmail.com>2007-10-05 15:59:02 -0700
commitae97b66845a6286ea1a9c5a7ff06cb955ceec1e8 (patch)
tree38e83f5682e17e5d0c4d4cf9470bb92a2b393395 /pg.h
parent7d33e33a957f47478e2cf71a0a9a8f40fb85aaa7 (diff)
Added the 'R' command to monitor table statistics in from the database.
Currently showing the cumulative values. Will added support to show rate of change later.
Diffstat (limited to 'pg.h')
-rw-r--r--pg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pg.h b/pg.h
index 497c129..f1a4933 100644
--- a/pg.h
+++ b/pg.h
@@ -5,6 +5,13 @@
#include <libpq-fe.h>
+#define SELECT_TABLE_STATS \
+ "SELECT relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch, " \
+ " n_tup_ins, n_tup_upd, n_tup_del\n" \
+ "FROM pg_stat_user_tables\n" \
+ "ORDER BY relname"
+
PGconn *connect_to_db(char *);
+void pg_display_table_stats(char *);
#endif /* _PG_H_ */