add testcase for statement_history and standby_statement_history

This commit is contained in:
gentle_hu
2023-08-26 11:09:43 +08:00
parent c99bbe9e6c
commit b733e1bebe
2 changed files with 19 additions and 0 deletions

View File

@ -1,2 +1,10 @@
select provariadic,oid, proname from pg_proc where arraycontains(proargmodes::char[],ARRAY['v'::char]) order by oid;
select prokind,length(prokind),count(*) from pg_proc where oid < 16384 group by prokind;
-- The structure of function standby_statement_history must be consistent with table statement_history.
select
(select relnatts from pg_class where relname = 'statement_history' limit 1)
=
(select array_length(proargnames, 1) - 1 from pg_proc where proname = 'standby_statement_history' order by 1 limit 1)
as issame;

View File

@ -34,3 +34,14 @@ select prokind,length(prokind),count(*) from pg_proc where oid < 16384 group by
--? f | 1 | .*
(1 row)
-- The structure of function standby_statement_history must be consistent with table statement_history.
select
(select relnatts from pg_class where relname = 'statement_history' limit 1)
=
(select array_length(proargnames, 1) - 1 from pg_proc where proname = 'standby_statement_history' order by 1 limit 1)
as issame;
issame
--------
t
(1 row)