pg_ossie
pg_ossie · Store and retrieve Ossie semantic model documents per schema
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102474 | pg_ossie | pg_ossie | 0.1.0 | FEAT | Apache-2.0 | SQL |
PostgreSQL · 13, 14, 15, 16, 17, 18, 19
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
pg_ossie 0.1.0 stores one Apache Ossie semantic-model document per schema as text. This reviewed source revision implements SQL and PL/pgSQL functions for PostgreSQL 13 or later. It does not generate business semantics or validate YAML.
Enable and inspect
Install the extension SQL files, then use an administrator to enable the fixed, nonrelocatable ossie schema:
The control file requires plpgsql; no shared library, preload or server restart is required. ossie.export_comments produces a starter document from catalog names, comments, columns, keys and foreign-key relationships. Review and validate that text externally before treating it as a model.
Store and retrieve
Keep the original validated YAML outside the database. In psql, supply its text through a variable:
ossie.set replaces the document for the same schema name and updates its timestamp and author label. ossie.get returns NULL when no document exists; ossie.delete reports whether a row was deleted. The stored specification version defaults to 0.1.1, independently of the extension version.
Privileges and maintenance
Functions execute with caller privileges. Application roles need suitable schema, function and table privileges on ossie.documents; the reviewed script does not grant a general application access policy. p_updated_by is caller-supplied metadata, not an independently authenticated audit identity.
Without p_validated => true, writes emit a reminder to validate externally. SET ossie.warn_on_set = off also suppresses it; neither option performs validation. Keep independent document copies and verify backup coverage for the extension-owned table before upgrades or removal. Dropping the extension removes its stored objects.