pg_sequence
pg_extensions · ERP document numbering with formatted, scoped, auto-incrementing sequences
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101619 | pg_sequence | pg_extensions | 0.3.0 | FUNC | Matroid-SAL-1.0 | Rust |
PostgreSQL · 14, 15, 16, 17
Usage
Sources:
- README.md
- extensions/pg_sequence/pg_sequence.control
- extensions/pg_sequence/src/definition.rs
- extensions/pg_sequence/src/generate.rs
- CHANGELOG.md
- LICENSE
pg_sequence 0.3.0 stores document-numbering rules in pgsequence, with prefixes, formatting, scopes and yearly/monthly reset policies.
Core Workflow
Operational Boundaries
The non-relocatable control is not superuser-only; no preload is required. create_sequence, alter_sequence and drop_sequence manage definitions; next_val, next_formatted, current_val and preview expose counters. The returned seq_id type supports comparison and indexing. Restrict resets and definition changes, and design scope keys to match business uniqueness rules. 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.