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

Commitb949bbc

Browse files
committed
Further adjust comment in get_partition_dispatch_recurse.
In editing09b12d5 I made it wrong;fix that and try to more clearly explain the situation.Patch by me, reviewed by David Rowley and Amit LangoteDiscussion:http://postgr.es/m/CA+TgmobAq+mA5hzm0a5OS38qQY5758DDDGqa3sBJN4hvir-H9w@mail.gmail.com
1 parentdbccdd3 commitb949bbc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎src/backend/executor/execPartition.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,13 @@ get_partition_dispatch_recurse(Relation rel, Relation parent,
973973
* The 'indexes' array is used when searching for a partition matching a
974974
* given tuple. The actual value we store here depends on whether the
975975
* array element belongs to a leaf partition or a subpartitioned table.
976-
* For leaf partitions we store the 0-based index into *leaf_part_oids,
977-
* and for sub-partitioned tables we store a negative version of the
978-
* 1-based index into the *pds list. When searching, if we see a negative
979-
* value, the search must continue in the corresponding sub-partition;
980-
* otherwise, we've identified the correct partition.
976+
* For leaf partitions we store the index into *leaf_part_oids, and for
977+
* sub-partitioned tables we store a negative version of the index into
978+
* the *pds list. Both indexes are 0-based, but the first element of the
979+
* *pds list is the root partition, so 0 always means the first leaf. When
980+
* searching, if we see a negative value, the search must continue in the
981+
* corresponding sub-partition; otherwise, we've identified the correct
982+
* partition.
981983
*/
982984
pd->indexes= (int*)palloc(partdesc->nparts*sizeof(int));
983985
for (i=0;i<partdesc->nparts;i++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp