Hello

Really good changes!

+ When applied to a partitioned table, the constraint is altered on the
+ partitioned table definition is implicitly applied to all partitions.

an "and" is missing here (definition and is)

+      When applied to a partitioned table, partition columns constraints
+      are implicitly renamed and specifying <literal>ONLY</literal>
is not allowed.
+     </para>

"partition columns constraints" - that seems like a strange/unclear
wording to me. maybe ", the partition's column constraints are ... " ?


+     <para>
+      When applied to a partitioned table <literal>ONLY</literal> is implicit,
+      these forms must be applied separately to the partitioned table and/or to
+      individual partitions.
+     </para>

"When applied to a partitioned table, <literal>ONLY</literal> is
implicit and ..."  (at multiple places, this is an example)

-   <para>
-    A recursive <literal>DROP COLUMN</literal> operation will remove a
-    descendant table's column only if the descendant does not inherit
-    that column from any other parents and never had an independent
-    definition of the column.  A nonrecursive <literal>DROP
-    COLUMN</literal> (i.e., <command>ALTER TABLE ONLY ... DROP
-    COLUMN</command>) never removes any descendant columns, but
-    instead marks them as independently defined rather than inherited.
-    A nonrecursive <literal>DROP COLUMN</literal> command will fail for a
-    partitioned table, because all partitions of a table must have the same
-    columns as the partitioning root.
-   </para>


"A nonrecursive DROP COLUMN (i.e., ALTER TABLE ONLY ... DROP COLUMN)
never removes any descendant columns, but instead marks them as
independently defined rather than inherited."

This part is now undocumented, it was only mentioned in this paragraph.

> C2 - Sub-commands where using them with a partitioned table will 
> automatically propagate to child partitions; ONLY prevents propagation; new 
> partitions inherit the parent’s new setting; and child partitions can be set 
> to different values than the parent.

The documentation of this group is inconsistent.

DROP CONSTRAINT mentions that individual partitions can be dropped separately:

+      When applied to a partitioned table, the constraint is dropped from
+      all existing partitions unless <literal>ONLY</literal> is specified.
+      Individual partitions may drop constraints independently of the
+      partitioned table.

But most of the sub commands in the C2 group leave the last sentence
out, and also the C7 (ADD table_constraint)

Also, isn't DROP CONSTRAINT on a partition limited to constraints
defined on that partition? So it would be better to say "may drop
constraints defined directly on that individual partition
independently".

  CREATE TABLE parent (id int, val int) PARTITION BY RANGE (id);
  ALTER TABLE parent ADD CONSTRAINT val_positive CHECK (val > 0);
  CREATE TABLE child PARTITION OF parent FOR VALUES FROM (1) TO (100);
  ALTER TABLE child DROP CONSTRAINT val_positive;
  -- ERROR: cannot drop inherited constraint "val_positive" of relation "child"

+      When a new partition is created, it generally inherits the current
+      definition-level properties of the parent partitioned table.

Maybe something like the following?

When a new partition is created, it generally inherits structural
properties of the parent partitioned table, such as column
definitions, constraints, and storage settings.

To be more explicit about what's inherited, and not only focus on
what's not. (The commit message also says that the change describes
both what's inherited and what's not inherited)


Reply via email to