PG-563: Update TAP testcases and output due to changes by DEV.

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.
This commit is contained in:
Naeem Akhter
2022-12-24 22:44:05 +05:00
parent 56001d683f
commit b154da01da
68 changed files with 1282 additions and 10492 deletions

View File

@@ -1,8 +1,8 @@
Create EXTENSION pg_stat_monitor;
CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
Set application_name = 'naeem' ;
SET application_name = 'naeem' ;
SELECT 1 AS num;
Set application_name = 'psql' ;
SET application_name = 'psql' ;
SELECT 1 AS num;
SELECT query,application_name FROM pg_stat_monitor ORDER BY query, application_name COLLATE "C";
SELECT pg_stat_monitor_reset();

View File

@@ -1,4 +1,4 @@
Drop Table if exists Company;
DROP TABLE IF EXISTS Company;
CREATE TABLE Company(
ID INT PRIMARY KEY NOT NULL,
@@ -11,7 +11,7 @@ SELECT pg_stat_monitor_reset();
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
INSERT INTO Company(ID, Name) VALUES (1, 'Percona');
Drop Table if exists Company;
DROP TABLE IF EXISTS Company;
SELECT query, elevel, sqlcode, message FROM pg_stat_monitor ORDER BY query COLLATE "C",elevel;
SELECT pg_stat_monitor_reset();
DROP EXTENSION pg_stat_monitor;

View File

@@ -1,3 +1,4 @@
DROP ROLE IF EXISTS su;
CREATE USER su WITH SUPERUSER;
SET ROLE su;
@@ -10,6 +11,6 @@ SELECT routine_schema, routine_name, routine_type, data_type FROM information_sc
SET ROLE u1;
SELECT routine_schema, routine_name, routine_type, data_type FROM information_schema.routines WHERE routine_schema = 'public' ORDER BY routine_name COLLATE "C";
set role su;
SET ROLE su;
DROP USER u1;
DROP EXTENSION pg_stat_monitor;

View File

@@ -1,13 +1,8 @@
CREATE EXTENSION pg_stat_monitor;
\x
SELECT name
, setting
, unit
, category
, short_desc
, extra_desc
, context
, vartype
, source
@@ -16,16 +11,11 @@ SELECT name
, enumvals
, boot_val
, reset_val
, sourcefile
, sourceline
, pending_restart
FROM pg_settings
WHERE name LIKE 'pg_stat_monitor.%'
AND name NOT LIKE 'pg_stat_monitor.pgsm_track_planning'
ORDER
BY name
COLLATE "C";
\x
DROP EXTENSION pg_stat_monitor;

View File

@@ -16,10 +16,10 @@ SELECT pg_stat_monitor_reset();
-- test the schema qualified table
CREATE schema sch1;
CREATE schema sch2;
CREATE schema sch3;
CREATE schema sch4;
CREATE SCHEMA sch1;
CREATE SCHEMA sch2;
CREATE SCHEMA sch3;
CREATE SCHEMA sch4;
CREATE TABLE sch1.foo1(a int);
CREATE TABLE sch2.foo2(b int);

View File

@@ -1,5 +1,5 @@
CREATE EXTENSION pg_stat_monitor;
Set pg_stat_monitor.pgsm_track='all';
SET pg_stat_monitor.pgsm_track='all';
SELECT pg_stat_monitor_reset();
CREATE OR REPLACE FUNCTION add(int, int) RETURNS INTEGER AS
$$
@@ -7,7 +7,7 @@ BEGIN
return (select $1 + $2);
END; $$ language plpgsql;
CREATE OR REPLACE function add2(int, int) RETURNS int as
CREATE OR REPLACE FUNCTION add2(int, int) RETURNS INTEGER AS
$$
BEGIN
return add($1,$2);