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

Commitabba8f5

Browse files
author
Artur Zakirov
committed
Use iptr of RumSortItem
1 parent1d4c316 commitabba8f5

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎rumsort.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,8 +3849,6 @@ comparetup_rum(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
38493849
float8v1=DatumGetFloat8(a->datum1);
38503850
float8v2=DatumGetFloat8(b->datum1);
38513851
inti;
3852-
IndexTupletuple1;
3853-
IndexTupletuple2;
38543852

38553853
if (v1<v2)
38563854
return-1;
@@ -3868,22 +3866,18 @@ comparetup_rum(const SortTuple *a, const SortTuple *b, Tuplesortstate *state)
38683866
}
38693867

38703868
/*
3871-
* If key values are equal, we sort on ItemPointer. This does not affect
3872-
* validity of the finished index, but it may be useful to have index
3873-
* scans in physical order.
3869+
* If key values are equal, we sort on ItemPointer.
38743870
*/
3875-
tuple1= (IndexTuple)a->tuple;
3876-
tuple2= (IndexTuple)b->tuple;
38773871
{
3878-
BlockNumberblk1=ItemPointerGetBlockNumber(&tuple1->t_tid);
3879-
BlockNumberblk2=ItemPointerGetBlockNumber(&tuple2->t_tid);
3872+
BlockNumberblk1=ItemPointerGetBlockNumber(&i1->iptr);
3873+
BlockNumberblk2=ItemPointerGetBlockNumber(&i2->iptr);
38803874

38813875
if (blk1!=blk2)
38823876
return (blk1<blk2) ?-1 :1;
38833877
}
38843878
{
3885-
OffsetNumberpos1=ItemPointerGetOffsetNumber(&tuple1->t_tid);
3886-
OffsetNumberpos2=ItemPointerGetOffsetNumber(&tuple2->t_tid);
3879+
OffsetNumberpos1=ItemPointerGetOffsetNumber(&i1->iptr);
3880+
OffsetNumberpos2=ItemPointerGetOffsetNumber(&i2->iptr);
38873881

38883882
if (pos1!=pos2)
38893883
return (pos1<pos2) ?-1 :1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp