Thread: pgsql: Add some tests to check the SQL functions of control file

pgsql: Add some tests to check the SQL functions of control file

From
Michael Paquier
Date:
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1b9cd69c5bdd1a331891f282106125e6f2524991

Modified Files
--------------
src/test/regress/expected/misc_functions.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/misc_functions.sql      |  6 ++++++
2 files changed, 31 insertions(+)