mtm
aggregate to find min and max
mtm · aggregate to find min and max
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (mtm.control)
- Official extension SQL (mtm–0.1.sql)
mtm — aggregate to find min and max. Use it when SQL needs these specialized functions or aggregates. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
final_mtm(state state_mtm)is an extension function and returnstext.final_mtm(state state_mtm_dp)is an extension function and returnstext.transition_mtm(state state_mtm, val numeric)is an extension function and returnsstate_mtm.transition_mtm(state state_mtm_dp, val double precision)is an extension function and returnsstate_mtm_dp.max_to_minis an aggregate exposed by the extension.state_mtmis an extension-defined type.state_mtm_dpis an extension-defined type.
Requirements and Caveats
- The reviewed control file declares default version
0.1. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.