mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fire per-statement triggers on partitioned tables.
Even though no actual tuples are ever inserted into a partitioned table (the actual tuples are in the partitions, not the partitioned table itself), we still need to have a ResultRelInfo for the partitioned table, or per-statement triggers won't get fired. Amit Langote, per a report from Rajkumar Raghuwanshi. Reviewed by me. Discussion: http://postgr.es/m/CAKcux6%3DwYospCRY2J4XEFuVy0L41S%3Dfic7rmkbsU-GXhhSbmBg%40mail.gmail.com
This commit is contained in:
@ -6437,6 +6437,7 @@ make_modifytable(PlannerInfo *root,
|
||||
node->partitioned_rels = partitioned_rels;
|
||||
node->resultRelations = resultRelations;
|
||||
node->resultRelIndex = -1; /* will be set correctly in setrefs.c */
|
||||
node->rootResultRelIndex = -1; /* will be set correctly in setrefs.c */
|
||||
node->plans = subplans;
|
||||
if (!onconflict)
|
||||
{
|
||||
|
Reference in New Issue
Block a user