mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
As part of this PR, also updated regression test cases that are related to following JIRA issues as well. PG-354 pg_stat_monitor: Remove pg_stat_monitor_settings view Now we not using pg_stat_monitor_settings view, due to this change majority of TAP testcase requried output changes. PG-558: Create test case to verify the function names and count in PGSM. Added additional output file for SQL test case. PG-554: Remove redundant expected output files from regression. Removed unnecessary output files in TAP testcases where these were not needed.
35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
DROP TABLE IF EXISTS Company;
|
|
NOTICE: table "company" does not exist, skipping
|
|
CREATE TABLE Company(
|
|
ID INT PRIMARY KEY NOT NULL,
|
|
NAME TEXT NOT NULL
|
|
);
|
|
CREATE EXTENSION pg_stat_monitor;
|
|
SELECT pg_stat_monitor_reset();
|
|
pg_stat_monitor_reset
|
|
-----------------------
|
|
|
|
(1 row)
|
|
|
|
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
|
|
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
|
|
ERROR: duplicate key value violates unique constraint "company_pkey"
|
|
DETAIL: Key (id)=(1) already exists.
|
|
DROP TABLE IF EXISTS Company;
|
|
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel;
|
|
query | elevel | sqlcode | message
|
|
-------------------------------------------------------+--------+---------+---------------------------------------------------------------
|
|
DROP TABLE IF EXISTS Company | 0 | |
|
|
INSERT INTO Company(ID, Name) VALUES (1, 'Percona') | 0 | |
|
|
INSERT INTO Company(ID, Name) VALUES (1, 'Percona'); | 21 | 23505 | duplicate key value violates unique constraint "company_pkey"
|
|
SELECT pg_stat_monitor_reset() | 0 | |
|
|
(4 rows)
|
|
|
|
SELECT pg_stat_monitor_reset();
|
|
pg_stat_monitor_reset
|
|
-----------------------
|
|
|
|
(1 row)
|
|
|
|
DROP EXTENSION pg_stat_monitor;
|