Skip to content

Supported Features

pgmt diffs live PostgreSQL catalogs, so it manages what it can read back from pg_catalog. This page lists object coverage and — more importantly — what’s partial, missing, or has known sharp edges.

  • ✅ Supported
  • 🚧 Partial — works with documented gaps
  • ❌ Not supported

Requires PostgreSQL 13 or later.

ObjectStatusNotes
Schemas
TablesColumns, defaults, identity columns (GENERATED ... AS IDENTITY), type changes, RLS settings
ViewsIncluding security_barrier / security_invoker
Materialized viewsPlanned
Partitioned tablesPlanned
Enum typesAdding values only — PostgreSQL can’t reorder or remove enum values
Composite types🚧Create/drop and attribute comments; ALTER TYPE ADD/DROP/ALTER ATTRIBUTE not supported
Domains🚧Create/drop; some ALTER DOMAIN constraint operations missing
Range types
Functions & proceduresOverloading; volatility, STRICT, SECURITY, PARALLEL attributes. OUT/INOUT/VARIADIC parameters and parameter defaults not supported
Aggregates
OperatorsAll clauses (COMMUTATOR, NEGATOR, RESTRICT, JOIN, HASHES, MERGES), prefix operators
CastsWITH FUNCTION, WITH INOUT, WITHOUT FUNCTION; see known issues for views using I/O casts
Sequences🚧Create/drop, OWNED BY (SERIAL integration); identity-owned sequences are part of their column, not standalone objects; some ALTER SEQUENCE options missing
IndexesAll access methods; partial, expression, and covering indexes; operator classes, collations, storage parameters, tablespaces
ConstraintsPrimary key, unique, foreign key (actions, deferrable), check, exclusion
TriggersAll timings and events, WHEN conditions, transition tables, column-specific UPDATE OF
ExtensionsExtension-owned objects are excluded from management automatically
CommentsOn all supported objects, including columns and composite attributes
GrantsTables, views, schemas, functions, sequences, types; column-level grants; WITH GRANT OPTION; only privilege deltas are emitted
RLS policiesAll command types, permissive/restrictive, role targeting, USING/WITH CHECK
RolesBy design — see Roles and Permissions

Dependencies come from the PostgreSQL catalogs, not from parsing your SQL: objects are created, altered, and dropped in dependency order, including function signatures, view references, foreign keys, sequence ownership, and extension-provided types, functions, and operator classes (an index using gin_trgm_ops is ordered after CREATE EXTENSION pg_trgm).

The one gap PostgreSQL itself has: it records no dependencies for the bodies of SQL functions. When a function body references another object, add an explicit -- require: header to the file.

  • Function body dependencies — PostgreSQL doesn’t track them; use -- require: (see above).
  • Enum values — append-only; reordering or removing a value requires a manual table rewrite, as in PostgreSQL itself.
  • I/O and binary casts in views — casts created WITH INOUT or WITHOUT FUNCTION that are used inside a view or function body aren’t auto-ordered (PostgreSQL records no dependency on them); add -- require: on the cast’s file.
  • Extension schema dependencies — extensions created in custom schemas may not order correctly (schema before extension).
  • Extension CASCADE drops — dropping an extension with dependent objects requires manual CASCADE handling.
  • Complex circular dependencies — some cycles need manual resolution via -- require:.
  • Data migrations — pgmt manages schema structure; data transformations belong in multi-section migrations or external tooling.
  • Role management — roles must exist before grants reference them; manage them with a roles file or external tooling.
  • Zero-downtime guarantees — depends on the specific change; see Production Operations.

Migration generation, application, validation, baselines, and drift detection are covered in the Migration Workflow and CI/CD guides.