Coverity complained that my commit
80ba4bb38353 added a dubious coding
for a consistency check that there isn't more than one row for a certain
tgrelid/tgparentid combination. But we don't check for that explicitly
anywhere else, and if we were to do it, it should be a full
shouldn't-happen elog not just an assert. It doesn't seem that this is
very important anyway, so remove it.
Discussion: https://postgr.es/m/
1337562.
1627224583@sss.pgh.pa.us
SysScanDesc tgscan;
ScanKeyData key;
HeapTuple tuple;
- int found PG_USED_FOR_ASSERTS_ONLY = 0;
/*
* Given a relation and the OID of a trigger on parent relation, find the
if (tgform->tgparentid != parentTriggerOid)
continue; /* not our trigger */
- Assert(found++ <= 0);
-
partitionRel = table_open(partitionId, NoLock);
/* Rename the trigger on this partition */
}
}
table_close(partitionRel, NoLock);
+
+ /* There should be at most one matching tuple */
+ break;
}
systable_endscan(tgscan);
}