1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +03:00

Fix reporting of constraint violations for table partitioning.

After a tuple is routed to a partition, it has been converted from the
root table's row type to the partition's row type.  ExecConstraints
needs to report the failure using the original tuple and the parent's
tuple descriptor rather than the ones for the selected partition.

Amit Langote
This commit is contained in:
Robert Haas
2017-01-04 14:36:34 -05:00
parent 3e353a7bc2
commit f1b4c771ea
8 changed files with 86 additions and 26 deletions

View File

@ -1324,6 +1324,7 @@ ExecuteTruncate(TruncateStmt *stmt)
rel,
0, /* dummy rangetable index */
false,
NULL,
0);
resultRelInfo++;
}