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

Commit183c869

Browse files
committed
adjust_partition_colnos mustn't be called if not needed
Add an assert to make this very explicit, as well as a code comment.The former should silence Coverity complaining about this.Introduced by7103ebb.Reported-by: Ranier VilelaDiscussion:https://postgr.es/m/CAEudQAqTTAOzXiYybab+1DQOb3ZUuK99=p_KD+yrRFhcDbd0jg@mail.gmail.com
1 parent4533de3 commit183c869

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/executor/execPartition.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,19 +1530,25 @@ ExecBuildSlotPartitionKeyDescription(Relation rel,
15301530
* adjust_partition_colnos
15311531
*Adjust the list of UPDATE target column numbers to account for
15321532
*attribute differences between the parent and the partition.
1533+
*
1534+
* Note: mustn't be called if no adjustment is required.
15331535
*/
15341536
staticList*
15351537
adjust_partition_colnos(List*colnos,ResultRelInfo*leaf_part_rri)
15361538
{
15371539
TupleConversionMap*map=ExecGetChildToRootMap(leaf_part_rri);
15381540

1541+
Assert(map!=NULL);
1542+
15391543
returnadjust_partition_colnos_using_map(colnos,map->attrMap);
15401544
}
15411545

15421546
/*
15431547
* adjust_partition_colnos_using_map
15441548
*Like adjust_partition_colnos, but uses a caller-supplied map instead
15451549
*of assuming to map from the "root" result relation.
1550+
*
1551+
* Note: mustn't be called if no adjustment is required.
15461552
*/
15471553
staticList*
15481554
adjust_partition_colnos_using_map(List*colnos,AttrMap*attrMap)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp