mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
PG-286: Update regression tests.
As the query normalization and query cleaning is always done in the right place (pgss_store), no more parsed queries have a trailling comma ';' at the end. Also, on error regression test, after fixing some problems with utility related queries, we now have two entries for the RAISE WARNING case, the first entry is the utility query itself, the second entry is the error message logged by emit_log_hook. Some queries have the order adjusted due to the fix introduced by the previous commits.
This commit is contained in:
committed by
Hamid Akhtar
parent
4ed0b7cf3e
commit
82031ed52c
@@ -21,18 +21,22 @@ RAISE WARNING 'warning message';
|
||||
END $$;
|
||||
WARNING: warning message
|
||||
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel;
|
||||
query | elevel | sqlcode | message
|
||||
------------------------------------------------------------------------------------------------+--------+---------+-----------------------------------
|
||||
ELECET * FROM unknown; | 20 | 42601 | syntax error at or near "ELECET"
|
||||
SELECT * FROM unknown; | 20 | 42P01 | relation "unknown" does not exist
|
||||
SELECT 1/0; | 20 | 22012 | division by zero
|
||||
SELECT pg_stat_monitor_reset(); | 0 | |
|
||||
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel; | 0 | |
|
||||
do $$ +| 19 | 01000 | warning message
|
||||
BEGIN +| | |
|
||||
RAISE WARNING 'warning message'; +| | |
|
||||
END $$; | | |
|
||||
(6 rows)
|
||||
query | elevel | sqlcode | message
|
||||
-----------------------------------------------------------------------------------------------+--------+---------+-----------------------------------
|
||||
ELECET * FROM unknown; | 20 | 42601 | syntax error at or near "ELECET"
|
||||
SELECT * FROM unknown; | 20 | 42P01 | relation "unknown" does not exist
|
||||
SELECT 1/0; | 20 | 22012 | division by zero
|
||||
SELECT pg_stat_monitor_reset() | 0 | |
|
||||
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel | 0 | |
|
||||
do $$ +| 0 | |
|
||||
BEGIN +| | |
|
||||
RAISE WARNING 'warning message'; +| | |
|
||||
END $$ | | |
|
||||
do $$ +| 19 | 01000 | warning message
|
||||
BEGIN +| | |
|
||||
RAISE WARNING 'warning message'; +| | |
|
||||
END $$; | | |
|
||||
(7 rows)
|
||||
|
||||
SELECT pg_stat_monitor_reset();
|
||||
pg_stat_monitor_reset
|
||||
|
||||
Reference in New Issue
Block a user