Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21b3aa9

Browse files
committed
Remove newly added useless assertion check
Coverity complained that my commit80ba4bb added a dubious codingfor a consistency check that there isn't more than one row for a certaintgrelid/tgparentid combination. But we don't check for that explicitlyanywhere else, and if we were to do it, it should be a fullshouldn't-happen elog not just an assert. It doesn't seem that this isvery important anyway, so remove it.Discussion:https://postgr.es/m/1337562.1627224583@sss.pgh.pa.us
1 parentf68b609 commit21b3aa9

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
SysScanDesctgscan;
16161616
ScanKeyDatakey;
16171617
HeapTupletuple;
1618-
intfoundPG_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)

[8]ページ先頭

©2009-2025 Movatter.jp