pg_readme
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_readme | 0.7.1 | UTIL | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4300 | pg_readme | No | No | No | Yes | No | Yes | - |
| 4301 | pg_readme_test_extension | No | No | No | Yes | No | Yes | - |
| Related | hstore ddlx pg_render schedoc pgdd meta pgpdf pg_get_functiondef pg_dbms_metadata pg_catcheck pg_query_rewrite |
|---|
Catalog release is 0.7.1; PGDG remains the RPM maintainer at 0.7.0, so the PIGSTY 0.7.1 RPM must not be published; PIGSTY maintains the 0.7.1 DEB package.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 0.7.1 | 1817161514 | pg_readme | hstore |
| RPM | PGDG | 0.7.0 | 1817161514 | pg_readme_$v | - |
| DEB | PIGSTY | 0.7.1 | 1817161514 | postgresql-$v-pg-readme | - |
Build
You can build the DEB packages for pg_readme using pig build:
Install
You can install pg_readme directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
pg_readme generates Markdown documentation for a PostgreSQL extension or schema from COMMENT objects and live catalog metadata. Use it to keep an extension’s README close to its SQL definitions and verify the generated output in source control.
Install and Generate Markdown
The control file requires hstore, is relocatable, and permits non-superuser installation when the caller can install its dependencies and create the objects.
Add Processing Instructions
Put Markdown and processing instructions in the extension or schema comment:
<?pg-readme-reference?> expands to a catalog-derived object reference. <?pg-readme-colophon?> adds generation metadata. Optional instruction attributes can adjust the heading depth when embedding generated sections.
Settings
pg_readme.include_view_definitions: include view definitions; defaulttrue.pg_readme.include_routine_definitions_like: array of routine-name patterns whose definitions are included; default'{test__%}'.pg_readme.include_this_routine_definition: routine-local override for including the current definition.pg_readme.readme_url: upstream README link used by generated material.
Use SET options on a wrapper function or transaction when a project needs reproducible generation settings.
Version 0.7.1 and Caveats
- Version 0.7.1 fixes PostgreSQL 18 reference generation that could duplicate array/composite table types and
NOT NULLmarkers. - Upstream and the current Pigsty DEB package are 0.7.1, while the current Pigsty RPM package remains 0.7.0. Check
pg_available_extension_versionsbefore relying on the PostgreSQL 18 fix. - Generated output reflects the current database catalog, installed extension versions, comments, and generation time. Review diffs instead of assuming two environments produce identical text.
- Catalog introspection does not replace hand-written operational guidance. Keep prerequisites, preload/restart behavior, upgrade notes, and unsafe operations in curated prose.
- The singular setting
pg_readme.include_routine_definition_likeappears in an old README wrapper example, but the documented current GUC is the pluralpg_readme.include_routine_definitions_like.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)