@@ -82,8 +82,11 @@ reconciled in place where PostgreSQL can express it:
8282- ** Tables** — add column, set/drop default, set/drop not-null,
8383 add/drop check constraints, foreign keys and exclusion constraints,
8484 primary-key and unique additions, index and trigger create/drop,
85- ` REPLICA IDENTITY ` , and comment changes. A changed comment on an
86- exclusion constraint is set alone, without rebuilding its index.
85+ ` REPLICA IDENTITY ` , column storage, compression, statistics target
86+ and options, rules (` CREATE OR REPLACE RULE ` , their state and
87+ comment), and comment changes, including comments on constraints. A
88+ changed comment on a constraint is set alone, without rebuilding the
89+ constraint; a constraint that is re-added gets its comment again.
8790 Identity columns are added, and their ` ALWAYS ` /` BY DEFAULT ` behavior
8891 and sequence options changed, with ` ALTER COLUMN ` ; renaming an
8992 identity's sequence falls back. A ` NOT VALID ` check, foreign key or
@@ -103,7 +106,8 @@ reconciled in place where PostgreSQL can express it:
103106 pglifecycle modeled them, leaves the table's row security as the
104107 database has it.
105108- ** Functions and views** — ` CREATE OR REPLACE ` (a function whose
106- return type changed must be dropped first, so it falls back).
109+ return type changed must be dropped first, so it falls back). A
110+ view's rules are reconciled after it.
107111- ** Sequences** — a single ` ALTER SEQUENCE ` of the changed options.
108112- ** Domains** — set/drop default; a base-type or constraint change
109113 falls back.
@@ -133,6 +137,12 @@ any are pending. Index, trigger, and constraint drops issued while
133137reconciling a table are * not* gated: they lose no data and the project
134138is authoritative.
135139
140+ ` DROP RULE ` is gated although a rule holds no data. A `DO INSTEAD
141+ NOTHING` rule can block writes, so dropping one can let through changes
142+ the database refused before. A project pulled with a version of
143+ pglifecycle that did not model rules has none on any table or view,
144+ and the gate stops a deploy of that project from dropping every rule.
145+
136146` DROP IDENTITY ` is gated although it keeps every row: the sequence goes
137147with it, so adding the identity back restarts the numbering and
138148collides with existing keys. A project pulled with a version of
@@ -161,16 +171,17 @@ Ownership is not managed (the script behaves like
161171` pg_restore --no-owner ` ), and roles, users, groups, and tablespaces are
162172skipped entirely — they are cluster-level objects a single-database
163173dump cannot capture. Aggregates, casts, collations, conversions, event
164- triggers, publications, text search objects and default privileges are
165- created when
174+ triggers, publications, text search objects, default privileges and
175+ extended statistics are created when
166176missing but otherwise only existence-checked: ` pull ` models them, but
167177` deploy ` does not compare their definitions yet, so a changed one is
168178left as the database has it. An aggregate is matched by its name and
169179input types, so each overload is checked on its own. Text search
170180objects are checked per schema: when a schema has any text search
171181object in the database, ` deploy ` creates none of the project's text
172182search objects in that schema. Object types ` pull ` does not yet model
173- (operators, rules, extended statistics, …) are handled the same way. Privileges on
183+ (operators, operator classes and families, access methods, …) are
184+ handled the same way. Privileges on
174185created objects are emitted (unless ` -x ` ); privilege changes on objects
175186that already exist are not yet diffed.
176187
@@ -216,14 +227,14 @@ went missing.
216227``` console
217228$ pglifecycle pull ./project -d mydb
218229...
219- error: 3 dump entries could not be modeled (RULE, STATISTICS ), so the
230+ error: 3 dump entries could not be modeled (OPERATOR, OPERATOR CLASS ), so the
220231generated project would not reproduce the source database.
221232The entries were preserved in ./project/remaining.yaml; re-run with
222233--allow-unsupported to accept the project as it is.
223234```
224235
225236A ` COMMENT ` entry counts as unmodeled when the model has no place for
226- it, such as a comment on a primary key or foreign key constraint .
237+ it, such as a comment on an object type that ` pull ` does not model .
227238
228239The project directory is written either way, so ` remaining.yaml ` is
229240there to inspect. ` --allow-unsupported ` downgrades the failure to a
0 commit comments