pg_stat_statements: Add test coverage for pg_stat_statements_1_8()
This requires reading pg_stat_statements at least once while the 1.8 version of the extension is installed. Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/40d1e4f2-835f-448f-a541-8ff5db75bf3d@eisentraut.org
This commit is contained in:
parent
7d7ef075d2
commit
3727b8d0e3
@ -88,6 +88,17 @@ SELECT count(*) > 0 AS has_data FROM pg_stat_statements;
|
|||||||
|
|
||||||
-- New functions and views for pg_stat_statements in 1.8
|
-- New functions and views for pg_stat_statements in 1.8
|
||||||
AlTER EXTENSION pg_stat_statements UPDATE TO '1.8';
|
AlTER EXTENSION pg_stat_statements UPDATE TO '1.8';
|
||||||
|
SELECT pg_get_functiondef('pg_stat_statements_reset'::regproc);
|
||||||
|
pg_get_functiondef
|
||||||
|
--------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
CREATE OR REPLACE FUNCTION public.pg_stat_statements_reset(userid oid DEFAULT 0, dbid oid DEFAULT 0, queryid bigint DEFAULT 0)+
|
||||||
|
RETURNS void +
|
||||||
|
LANGUAGE c +
|
||||||
|
PARALLEL SAFE STRICT +
|
||||||
|
AS '$libdir/pg_stat_statements', $function$pg_stat_statements_reset_1_7$function$ +
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
\d pg_stat_statements
|
\d pg_stat_statements
|
||||||
View "public.pg_stat_statements"
|
View "public.pg_stat_statements"
|
||||||
Column | Type | Collation | Nullable | Default
|
Column | Type | Collation | Nullable | Default
|
||||||
@ -125,15 +136,10 @@ AlTER EXTENSION pg_stat_statements UPDATE TO '1.8';
|
|||||||
wal_fpi | bigint | | |
|
wal_fpi | bigint | | |
|
||||||
wal_bytes | numeric | | |
|
wal_bytes | numeric | | |
|
||||||
|
|
||||||
SELECT pg_get_functiondef('pg_stat_statements_reset'::regproc);
|
SELECT count(*) > 0 AS has_data FROM pg_stat_statements;
|
||||||
pg_get_functiondef
|
has_data
|
||||||
--------------------------------------------------------------------------------------------------------------------------------
|
----------
|
||||||
CREATE OR REPLACE FUNCTION public.pg_stat_statements_reset(userid oid DEFAULT 0, dbid oid DEFAULT 0, queryid bigint DEFAULT 0)+
|
t
|
||||||
RETURNS void +
|
|
||||||
LANGUAGE c +
|
|
||||||
PARALLEL SAFE STRICT +
|
|
||||||
AS '$libdir/pg_stat_statements', $function$pg_stat_statements_reset_1_7$function$ +
|
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- New function pg_stat_statement_info, and new function
|
-- New function pg_stat_statement_info, and new function
|
||||||
|
@ -33,8 +33,9 @@ SELECT count(*) > 0 AS has_data FROM pg_stat_statements;
|
|||||||
|
|
||||||
-- New functions and views for pg_stat_statements in 1.8
|
-- New functions and views for pg_stat_statements in 1.8
|
||||||
AlTER EXTENSION pg_stat_statements UPDATE TO '1.8';
|
AlTER EXTENSION pg_stat_statements UPDATE TO '1.8';
|
||||||
\d pg_stat_statements
|
|
||||||
SELECT pg_get_functiondef('pg_stat_statements_reset'::regproc);
|
SELECT pg_get_functiondef('pg_stat_statements_reset'::regproc);
|
||||||
|
\d pg_stat_statements
|
||||||
|
SELECT count(*) > 0 AS has_data FROM pg_stat_statements;
|
||||||
|
|
||||||
-- New function pg_stat_statement_info, and new function
|
-- New function pg_stat_statement_info, and new function
|
||||||
-- and view for pg_stat_statements introduced in 1.9
|
-- and view for pg_stat_statements introduced in 1.9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user