mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Fix failure to enforce partitioning contraint for internal partitions.
When a tuple is inherited into a partitioning root, no partition constraints need to be enforced; when it is inserted into a leaf, the parent's partitioning quals needed to be enforced. The previous coding got both of those cases right. When a tuple is inserted into an intermediate level of the partitioning hierarchy (i.e. a table which is both a partition itself and in turn partitioned), it must enforce the partitioning qual inherited from its parent. That case got overlooked; repair. Amit Langote
This commit is contained in:
@ -2432,7 +2432,6 @@ CopyFrom(CopyState cstate)
|
||||
InitResultRelInfo(resultRelInfo,
|
||||
cstate->rel,
|
||||
1, /* dummy rangetable index */
|
||||
true, /* do load partition check expression */
|
||||
NULL,
|
||||
0);
|
||||
|
||||
|
Reference in New Issue
Block a user