Skip to content

inflection-db

Generate consistent SQL object names from application identifiers.

inflection-db · Generate consistent SQL object names from application identifiers.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102162inflection-dbinflection-db0.47.0FUNCMITSQL
Relationships
Requirespgpm-inflection pgpm-verify plpgsql

Usage

Sources:

inflection-db builds database naming helpers on PGPM inflection. inflection_db.get_table_name pluralizes names, and helpers generate field, index, constraint, schema and namespace names.

Core Workflow

CREATE EXTENSION "inflection-db";
SELECT inflection_db.get_table_name('BlogPost');
SELECT inflection_db.get_index_name('BlogPost', ARRAY['created_at']);

Operational Boundaries

inflection_db.get_identifier truncates to 63 characters in the pinned SQL. This is not a uniqueness guarantee, and multibyte identifiers still need PostgreSQL byte-length checks. Generated names are text, not executed DDL; use identifier quoting when constructing SQL. inflection_db.get_index_name and inflection_db.get_unique_index_name accept arrays of fields. Dependencies are pgpm-inflection, pgpm-verify, plpgsql. This SQL-only module needs no library preload or restart; no PostgreSQL-major support matrix is published for this revision. Its fixed schema layout is not relocatable. Install the matching dependency closure before enabling it.

Table reader