pgschema
pgschema copied to clipboard
Terraform-style, declarative Postgres schema migration. Agent friendly.
`ON DELETE SET NULL` and `ON DELETE SET DEFAULT` accept an optional column list (Postgres 15+, `pg_constraint.confdelsetcols`). pgschema parses the clause but does not carry the column list, so a...
`plan` emits `GENERATED ALWAYS AS (...) STORED` correctly when it creates a column, but the generation clause is not part of the column comparison. Changing the expression of an existing...
## Summary `pgschema dump` omits a column's explicitly configured non-default collation. This changes the semantics of a schema recreated from the dump, including the collation inherited by indexes on that...
Using current pgschema git as of today... ignore views seems broken.. I have this in my .pgschemaignore... ``` [schemas] patterns = [ "audit", "loader" ] [triggers] patterns = [ "audit_trigger_row",...
We are using the extension pg_stat_statements. This extension creates various objects in your schema, like a function called pg_stat_statements and a view called pg_stat_statements. pgschema dumps the view, but not...
with some effort I've come up with a fairly cut down example of a schema that fails to plan. ``` $ pgschema plan --host localhost --db mytmp1 --user nsl --schema...
## Summary Changing a table trigger from its normal enabled state to `ENABLE REPLICA` or `ENABLE ALWAYS` produces a successful empty plan. The actual `pg_trigger.tgenabled` remains `O`, although the desired...
## Summary Adding an enum label and changing a column default to that label produces a successful plan, but applying the saved plan fails because both statements execute in the...
## Summary Changing a function's return type from `integer` to `bigint` while retaining a view that calls it generates only `DROP FUNCTION` and function recreation. The dependent view is absent...
## Summary With pgschema **1.13.0** and PostgreSQL **18.4**, a desired SQL file containing only an object-owner change produces a successful empty plan. The target object's owner stays unchanged. This was...