test_custom_stats: Add tests with read/write of auxiliary data
authorMichael Paquier <[email protected]>
Mon, 15 Dec 2025 00:47:30 +0000 (09:47 +0900)
committerMichael Paquier <[email protected]>
Mon, 15 Dec 2025 00:47:30 +0000 (09:47 +0900)
commit481783e69f144936f1ebbc3259809bee518c6c0c
tree9f3879981a2a6f6e05ed18ddc86e024edd33c1d8
parent4ba012a8ed9c4214bd35b221c087f02efb1ac424
test_custom_stats: Add tests with read/write of auxiliary data

This commit builds upon 4ba012a8ed9c, giving an example of what can be
achieved with the new callbacks.  This provides coverage for the new
pgstats APIs, while serving as a reference template.

Note that built-in stats kinds could use them, we just don't have a
use-case there yet.

Author: Sami Imseih <[email protected]>
Co-authored-by: Michael Paquier <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Discussion: https://postgr.es/m/CAA5RZ0s9SDOu+Z6veoJCHWk+kDeTktAtC-KY9fQ9Z6BJdDUirQ@mail.gmail.com
src/test/modules/test_custom_stats/t/001_custom_stats.pl
src/test/modules/test_custom_stats/test_custom_var_stats--1.0.sql
src/test/modules/test_custom_stats/test_custom_var_stats.c