index f391828e74fe44ce020b3e50c3b3fbbf43139377..fc5f4f66ead1ff92bec1d01f6a66a4c28875dd46 100644 (file)
@@ -2915,7 +2915,7 @@ CopyFromInsertBatch(CopyState cstate, EState *estate, CommandId mycid,
estate, false, NULL, NIL);
ExecARInsertTriggers(estate, resultRelInfo,
bufferedTuples[i],
- recheckIndexes, NULL);
+ recheckIndexes, cstate->transition_capture);
list_free(recheckIndexes);
}
}
index aaee30219ad2d710d09eccf13449944fa32b622e..ac132b042d598f104fda067835d1bd706800f595 100644 (file)
@@ -2156,6 +2156,11 @@ NOTICE: trigger = child3_delete_trig, old table = (CCC,42,foo)
-- are really inserted into the parent)
copy parent (a, b) from stdin;
NOTICE: trigger = parent_insert_trig, new table = (AAA,42), (BBB,42), (CCC,42)
+-- same behavior for copy if there is an index (interesting because rows are
+-- captured by a different code path in copy.c if there are indexes)
+create index on parent(b);
+copy parent (a, b) from stdin;
+NOTICE: trigger = parent_insert_trig, new table = (DDD,42)
-- DML affecting parent sees tuples collected from children even if
-- there is no transition table trigger on the children
drop trigger child1_insert_trig on child1;
drop trigger child3_update_trig on child3;
drop trigger child3_delete_trig on child3;
delete from parent;
-NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42)
+NOTICE: trigger = parent_delete_trig, old table = (AAA,42), (BBB,42), (CCC,42), (DDD,42)
drop table child1, child2, child3, parent;
--
-- Verify prohibition of row triggers with transition triggers on
index 659a5a1422bcd0914b59926a6887f190e6500c69..b10159a1cf2a3938ea9c51c0259b30ffcb1f721b 100644 (file)
CCC 42
\.
+-- same behavior for copy if there is an index (interesting because rows are
+-- captured by a different code path in copy.c if there are indexes)
+create index on parent(b);
+copy parent (a, b) from stdin;
+DDD 42
+\.
+
-- DML affecting parent sees tuples collected from children even if
-- there is no transition table trigger on the children
drop trigger child1_insert_trig on child1;