Skip to content

Commit 21b3aa9

Browse files
committed
Remove newly added useless assertion check
Coverity complained that my commit 80ba4bb 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
1 parent f68b609 commit 21b3aa9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/trigger.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,6 @@ renametrig_partition(Relation tgrel, Oid partitionId, Oid parentTriggerOid,
16151615
SysScanDesc tgscan;
16161616
ScanKeyData key;
16171617
HeapTuple tuple;
1618-
int found PG_USED_FOR_ASSERTS_ONLY = 0;
16191618

16201619
/*
16211620
* Given a relation and the OID of a trigger on parent relation, find the
@@ -1636,8 +1635,6 @@ renametrig_partition(Relation tgrel, Oid partitionId, Oid parentTriggerOid,
16361635
if (tgform->tgparentid != parentTriggerOid)
16371636
continue; /* not our trigger */
16381637

1639-
Assert(found++ <= 0);
1640-
16411638
partitionRel = table_open(partitionId, NoLock);
16421639

16431640
/* Rename the trigger on this partition */
@@ -1658,6 +1655,9 @@ renametrig_partition(Relation tgrel, Oid partitionId, Oid parentTriggerOid,
16581655
}
16591656
}
16601657
table_close(partitionRel, NoLock);
1658+
1659+
/* There should be at most one matching tuple */
1660+
break;
16611661
}
16621662
systable_endscan(tgscan);
16631663
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy