pg_fsm
pg_extensions · Transactional state-machine guards, actions and history.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102092 | pg_fsm | pg_extensions | 0.3.0 | FEAT | Matroid-SAL-1.0 | Rust |
PostgreSQL · 14, 15, 16, 17
Usage
Sources:
- extensions/pg_fsm/pg_fsm.control
- README.md
- extensions/pg_fsm/Cargo.toml
- extensions/pg_fsm/src/lib.rs
- CHANGELOG.md
- LICENSE
- extensions/pg_fsm/src/machine.rs
- extensions/pg_fsm/src/binding.rs
- extensions/pg_fsm/src/transition.rs
pg_fsm 0.3.0 defines finite state machines in pgfsm, with transition guards, actions, table bindings and history.
Core Workflow
Operational Boundaries
The control does not require superuser-only installation, but object-creation privileges still apply. No preload is required. Define states and transitions, then bind an application state column or call the transition API. Guards/actions execute database expressions, so restrict their authors. pg_fsm.enabled disables enforcement when false; pg_fsm.disable_default_notify suppresses the implicit notification. Version 0.3.0 adds idempotent seeding with if_not_exists. This project is distinct from the extension whose canonical name is fsm. This is an unsupported proof of concept under Matroid Source Available License 1.0. APIs may change. Version 0.3.0 is the new upgrade baseline: earlier 0.2.0 installations require a rehearsed data migration/recreation, not ordinary ALTER EXTENSION UPDATE. Back up data and dependencies before following that destructive upstream path.