pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
## Problem The `ROWS n` planner estimate on set-returning functions is not inspected, dumped or diffed. A function created with `ROWS 1` is replayed with the default estimate of 1000,...
## Version pgschema **1.14.1** ## Summary When an existing composite type gains an attribute that uses a new table’s row type, pgschema emits `ALTER TYPE` before `CREATE TABLE`. The apply...
## Problem With an external plan database (`--plan-host`) and target schema `public`, a view or materialized view that uses an operator owned by an extension installed in `public` (for example...
## Problem When a schema has `ALTER DEFAULT PRIVILEGES FOR ROLE IN SCHEMA ...`, `dump` omits the explicit `GRANT` on every table that the default privilege would cover, and `plan`...
## Problem When a function parameter or return type is a user-defined type in the target schema whose name collides with a `pg_catalog` type, the dump strips the schema qualifier...
## Problem Trigger function arguments are string literals that PostgreSQL passes verbatim to the trigger function as `TG_ARGV`. `dump` and `plan` rewrite their contents: a comma inside an argument gets...
## Problem `dump` drops the type modifier of date/time, interval and bit-string columns, and `plan` does not see the difference. `timestamp(3)`, `timestamptz(0)`, `time(2)`, `timetz(1)`, `interval(3)`, `interval hour to minute`, `bit(3)`...
## Problem `COMMENT ON COLUMN` for columns of views and materialized views is not dumped and not planned. The column-comment lookup in the inspector only runs for tables, so view...
I've spent the last few days trying to come up with some kind of a cut down demo I can give to my organisation about how we might use this,...
## Problem `pgschema dump` omits `INCLUDE` columns from PRIMARY KEY and UNIQUE constraints. Replay therefore creates different backing indexes. A subsequent plan can be empty because the inspector does not...