10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf7ca15 commit c8df947Copy full SHA for c8df947
src/backend/commands/trigger.c
@@ -4776,7 +4776,7 @@ AfterTriggerPendingOnRel(Oid relid)
4776
* if TRUNCATE/etc is executed by a function or trigger within an updating
4777
* query on the same relation, which is pretty perverse, but let's check.
4778
*/
4779
- for (depth = 0; depth <= afterTriggers.query_depth; depth++)
+ for (depth = 0; depth <= afterTriggers.query_depth && depth < afterTriggers.maxquerydepth; depth++)
4780
{
4781
for_each_event_chunk(event, chunk, afterTriggers.query_stack[depth])
4782
0 commit comments