PG-186: Add support to monitor query execution plan.

This requires refactoring of code to add this functionality. Along with
that this patch contains regression test cases.
This commit is contained in:
Ibrar Ahmed
2021-03-12 18:55:12 +00:00
parent 8f69daa5dd
commit 066162c3f6
34 changed files with 10234 additions and 1173 deletions

14
regression/sql/error.sql Normal file
View File

@@ -0,0 +1,14 @@
CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
SELECT 1/0; -- divide by zero
SELECT * FROM unknown; -- unknown table
ELECET * FROM unknown; -- syntax error
do $$
BEGIN
RAISE WARNING 'warning message';
END $$;
SELECT query, elevel,sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT pg_stat_monitor_reset();
DROP EXTENSION pg_stat_monitor;