Fix failure to enforce partitioning contraint for internal partitions.
Robert Haas <rhaas@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copy.c | modified | +0 −1 |
| src/backend/commands/tablecmds.c | modified | +0 −1 |
| src/backend/executor/execMain.c | modified | +33 −9 |
| src/include/executor/executor.h | modified | +0 −1 |
| src/test/regress/expected/insert.out | modified | +6 −0 |
| src/test/regress/sql/insert.sql | modified | +5 −0 |