Types¶
Not functions themselves, but the two return types that define the function-call contracts used throughout this reference.
pghf.check_result¶
The mandatory return type of every check implementation function (see Check Implementation Functions), and the value the collection engine reads back from each one.
| Field | Type | Description |
|---|---|---|
status |
text |
'COLLECTED' or 'SKIPPED' only. A check body never returns 'ERROR' itself — that's assigned automatically by the collection engine when a check's function raises an exception. |
observed |
jsonb |
The collected data for 'COLLECTED'; left empty for 'SKIPPED'. For every check whose result type isn't jsonb, this must include a "value" key holding the primary number or answer — see Metadata Columns Explained. |
note |
text |
Required (must not be empty) for 'SKIPPED', to explain why; optional for 'COLLECTED'. |
(jsonb is PostgreSQL's binary-optimised storage type for JSON — structured, JSON-shaped data. See the Glossary.)
pghf.evaluation_result¶
The mandatory return type of every custom evaluator function registered against a threshold, and the value the evaluation engine reads back from one when a threshold has one configured.
| Field | Type | Description |
|---|---|---|
severity |
text |
One of the 8 ranked states pghf._severity_rank() defines: 'skipped' (0), 'not_evaluable' (1), 'ok' (10), 'info' (20), 'warning' (30), 'invalid' (40), 'critical' (50), 'error_in_performing_check' (99). A custom evaluator would normally only ever return 'ok'/'info'/'warning'/'critical'/'not_evaluable' — the other three are assigned automatically by the evaluation engine itself (see How Threshold Evaluation Works). |
message |
text |
A human-readable explanation of the verdict. May be empty for 'ok'. |
detail |
jsonb |
Structured supporting data — the value or values the verdict was based on. May be empty. |
Continue to Extension and Environment Detection.