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

Commit096f1cc

Browse files
committed
Always initialize PartitionBoundInfoData's null_index.
This doesn't actually matter at present, because the current codenever consults null_index for range partitions. However, leavingit uninitialized is still a bad idea, so let's not do that.Amul Sul, reviewed by Ashutosh BapatDiscussion:http://postgr.es/m/CAAJ_b94AkEzcx+12ySCnbMDX7=UdF4BjnoBGfMQbB0RNSTo3Ng@mail.gmail.com
1 parentb6263cd commit096f1cc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/backend/catalog/partition.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ RelationBuildPartitionDesc(Relation rel)
454454
palloc0(sizeof(PartitionBoundInfoData));
455455
boundinfo->strategy=key->strategy;
456456
boundinfo->ndatums=ndatums;
457+
boundinfo->null_index=-1;
457458
boundinfo->datums= (Datum**)palloc0(ndatums*sizeof(Datum*));
458459

459460
/* Initialize mapping array with invalid values */
@@ -503,8 +504,6 @@ RelationBuildPartitionDesc(Relation rel)
503504
mapping[null_index]=next_index++;
504505
boundinfo->null_index=mapping[null_index];
505506
}
506-
else
507-
boundinfo->null_index=-1;
508507

509508
/* All partition must now have a valid mapping */
510509
Assert(next_index==nparts);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp