Add some tests to check the SQL functions of control file
authorMichael Paquier <michael@paquier.xyz>
Thu, 27 Oct 2022 00:58:44 +0000 (09:58 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 27 Oct 2022 00:58:44 +0000 (09:58 +0900)
commit1b9cd69c5bdd1a331891f282106125e6f2524991
treec327b4d9d933b10fb310c3bc49ab00fd81a84c1c
parentc591300a8f54d9711157d9a8866f022a257ec4ee
Add some tests to check the SQL functions of control file

As the recent commit 05d4cbf (reverted after as a448e49) has proved,
there is zero coverage for the four SQL functions that can scan the
control file data:
- pg_control_checkpoint()
- pg_control_init()
- pg_control_recovery()
- pg_control_system()

This commit adds a minimal coverage for these functions, checking that
their execution is able to complete.  This would have been enough to
catch the problems introduced in the commit mentioned above.  More
checks could be done for each individual fields, but it is unclear
whether this would be better than the other checks in place in the
backend code.

Per discussion with Bharath Rupireddy.

Discussion: https://postgr.es/m/Y1d2FZmQmyAhPSRG@paquier.xyz
src/test/regress/expected/misc_functions.out
src/test/regress/sql/misc_functions.sql