]> granicus.if.org Git - postgresql/commit
Fix failure to enforce partitioning contraint for internal partitions.
authorRobert Haas <rhaas@postgresql.org>
Thu, 19 Jan 2017 17:30:27 +0000 (12:30 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 19 Jan 2017 17:30:27 +0000 (12:30 -0500)
commit39162b2030fb0a35a6bb28dc636b5a71b8df8d1c
tree0f758fff3a427ec001774f0b60b89f7072ee5d16
parentbec96c82f8ff4fcf7ef0f070f6f7447edf106de3
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
src/backend/commands/copy.c
src/backend/commands/tablecmds.c
src/backend/executor/execMain.c
src/include/executor/executor.h
src/test/regress/expected/insert.out
src/test/regress/sql/insert.sql