Issue - (#34): PostgreSQL Version 13 support added.

This commit is contained in:
Ibrar Ahmed
2020-06-23 17:24:21 +00:00
parent 5536041539
commit 355436c4dc
5 changed files with 326 additions and 160 deletions

View File

@@ -17,14 +17,25 @@ CREATE FUNCTION pg_stat_monitor(IN showtext boolean,
OUT queryid text,
OUT query text,
OUT bucket_start_time timestamptz,
OUT calls int8,
OUT plan_calls int8,
OUT plan_total_time float8,
OUT plan_min_time float8,
OUT plan_max_time float8,
OUT plan_mean_time float8,
OUT plan_stddev_time float8,
OUT plan_rows int8,
OUT calls int8,
OUT total_time float8,
OUT min_time float8,
OUT max_time float8,
OUT mean_time float8,
OUT stddev_time float8,
OUT rows int8,
OUT shared_blks_hit int8,
OUT shared_blks_hit int8,
OUT shared_blks_read int8,
OUT shared_blks_dirtied int8,
OUT shared_blks_written int8,
@@ -96,13 +107,20 @@ CREATE VIEW pg_stat_monitor AS SELECT
dbid,
m.queryid,
query,
plan_calls,
round( CAST(plan_total_time as numeric), 2) as plan_total_time,
round( CAST(plan_min_time as numeric), 2) as plan_min_timei,
round( CAST(plan_max_time as numeric), 2) as plan_max_time,
round( CAST(plan_mean_time as numeric), 2) as plan_mean_time,
round( CAST(plan_stddev_time as numeric), 2) as plan_stddev_time,
plan_rows,
calls,
total_time,
min_time,
max_time,
mean_time,
stddev_time,
rows,
round( CAST(total_time as numeric), 2)as total_time,
round( CAST(min_time as numeric), 2)as min_time,
round( CAST(max_time as numeric), 2)as max_time,
round( CAST(mean_time as numeric), 2)as mean_time,
round( CAST(stddev_time as numeric), 2)as stddev_time,
rows,
shared_blks_hit,
shared_blks_read,
shared_blks_dirtied,