On 19.12.23 11:47, Ashutosh Bapat wrote:
> At this point I am looking for opinions on the above rules and whether
> the implementation is on the right track.
This looks on the right track to me.
> 0001 - change to get_partition_ancestors() prologue. Can be reviewed
> and committed independent of other patches.
I committed that.
> 0004 - An attached partition inherits identity property and uses the
> underlying sequence for direct INSERTs. When inheriting the identity
> property it should also inherit the NOT NULL constraint, but that's a
> TODO in this patch. We expect matching NOT NULL constraints to be
> present in the partition being attached. I am not sure whether we want
> to add NOT NULL constraints automatically for an identity column. We
> require a NOT NULL constraint to be present when adding identity
> property to a column. The behavior in the patch seems to be consistent
> with this.
I think it makes sense that the NOT NULL constraint must be added
manually before attaching is allowed.