plmuggin
PL/Muggin: an HTML templating language for PostgreSQL
plmuggin · PL/Muggin: an HTML templating language for PostgreSQL
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (plmuggin.control)
- Official extension SQL (plmuggin–0.1.sql)
plmuggin — PL/Muggin is a HTML template engine inspired by pug defined as a PostgreSQL language handler. Muggin templates are whitespace sensitive and look like this:. Use it when database code must run in or interoperate with this procedural language. Upstream explicitly says it is not production-ready.
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
plmuggin_call_handler()is an extension function and returnslanguage_handler.plmuggin_get_metadata(template_name TEXT, meta_key TEXT)is an extension function and returnsTEXT.plmuggin_templates()is an extension function and returnsSETOF.
Requirements and Caveats
- The reviewed control file declares default version
0.1. - The control file marks the extension as non-relocatable.
- The control file does not require superuser-only installation.
- The control file marks the extension as trusted.
- Upstream explicitly says the project is not production-ready.
- Upstream describes the project as a work in progress.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.