Skip to content

plmuggin

PL/Muggin: an HTML templating language for PostgreSQL

plmuggin · PL/Muggin: an HTML templating language for PostgreSQL

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101718plmugginplmuggin0.1LANGMITC

Usage

Sources:

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

CREATE EXTENSION plmuggin;

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 returns language_handler.
  • plmuggin_get_metadata(template_name TEXT, meta_key TEXT) is an extension function and returns TEXT.
  • plmuggin_templates() is an extension function and returns SETOF.

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.

Table reader