PG-543: pg_stat_monitor: PostgreSQL's pg_stat_statements compatible view. (#352)

* PG-543: pg_stat_monitor: PostgreSQL's pg_stat_statements compatible view.

The view now carries all the columns as pg_stat_statements. This required fixing
data types of some of the columns, renaming a few, as well inclusion of new
columns to make the view fully compatible with pg_stat_statements.

* PG-543: pg_stat_monitor: PostgreSQL's pg_stat_statements compatible view.

Updating the upgrade sql file from 1.0 to 2.0 version linked with this issue
changes.

* PG-543: pg_stat_monitor: PostgreSQL's pg_stat_statements compatible view.

Updating datum calls to use UInt64 rather than Int64.
This commit is contained in:
Hamid Akhtar
2023-01-19 01:55:20 +05:00
committed by GitHub
parent 7dece7cf1d
commit 1286427445
7 changed files with 91 additions and 81 deletions

View File

@@ -8540,14 +8540,14 @@ SELECt * FROM t2 WHERE b % 2 = 0;
5000
(2500 rows)
SELECT query, rows_retrieved FROM pg_stat_monitor ORDER BY query COLLATE "C";
query | rows_retrieved
-----------------------------------+----------------
SELECT * FROM t1 | 1000
SELECT * FROM t1 LIMIT 10 | 10
SELECT * FROM t2 | 5000
SELECT pg_stat_monitor_reset() | 1
SELECt * FROM t2 WHERE b % 2 = 0 | 2500
SELECT query, rows FROM pg_stat_monitor ORDER BY query COLLATE "C";
query | rows
-----------------------------------+------
SELECT * FROM t1 | 1000
SELECT * FROM t1 LIMIT 10 | 10
SELECT * FROM t2 | 5000
SELECT pg_stat_monitor_reset() | 1
SELECt * FROM t2 WHERE b % 2 = 0 | 2500
(5 rows)
SELECT pg_stat_monitor_reset();

View File

@@ -12,7 +12,7 @@ SELECT * FROM t2;
SELECT * FROM t1 LIMIT 10;
SELECt * FROM t2 WHERE b % 2 = 0;
SELECT query, rows_retrieved FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT query, rows FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT pg_stat_monitor_reset();
DROP TABLE t1;