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

Commit062e3d8

Browse files
author
Arseny Kositsyn
committed
[PGPRO-12159] Fixed the build on version 18 of PostgreSQL.
Tags: rum
1 parent3f1e6cf commit062e3d8

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

‎expected/security_1.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ CONTEXT: SQL statement "CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray)
1818
RETURNS bool
1919
AS '$libdir/rum'
2020
LANGUAGE C STRICT STABLE"
21-
extension script file "rum--1.3.sql", near line 1530
21+
extension script file "rum--1.4.sql", near line 1530
2222
DROP FUNCTION rum_anyarray_similar(anyarray,anyarray);

‎rum_init.sql‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LANGUAGE C;
66
/*
77
* RUM access method
88
*/
9+
910
CREATE ACCESS METHOD rum TYPE INDEX HANDLER rumhandler;
1011

1112
/*
@@ -411,7 +412,7 @@ AS
411412
/*
412413
* RUM version 1.1
413414
*/
414-
415+
415416
CREATEFUNCTIONrum_btree_consistent(internal,smallint,internal,int,internal,internal,internal,internal)
416417
RETURNS bool
417418
AS'MODULE_PATHNAME'

‎src/rum_debug_funcs.c‎

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ do { \
102102
#defineRumWriteResBlckNumToValues(piState,counter) \
103103
do { \
104104
(piState)->values[(counter)] = \
105-
UInt32GetDatum(PostingItemGetBlockNumber(&((piState)->curPitem))); \
105+
UInt32GetDatum(RumPostingItemGetBlockNumber(&((piState)->curPitem))); \
106106
} while(0)
107107

108108
#defineRumWriteResAddInfoToValues(piState,counter) \
@@ -129,7 +129,7 @@ do { \
129129
do { \
130130
memcpy(&((piState)->curPitem), \
131131
RumDataPageGetItem((piState)->page, \
132-
(piState)->srfFctx->call_cntr), sizeof(PostingItem)); \
132+
(piState)->srfFctx->call_cntr), sizeof(RumPostingItem)); \
133133
} while(0)
134134

135135
#defineRumPrepareResultTuple(piState) \
@@ -142,7 +142,7 @@ do { \
142142
} while(0)
143143

144144
#defineRumPrepareCurPitemToPostingList(piState) \
145-
memset(&((piState)->curPitem), 0, sizeof(PostingItem))
145+
memset(&((piState)->curPitem), 0, sizeof(RumPostingItem))
146146

147147
/*
148148
* This is necessary in order for the prepare_scan()
@@ -201,7 +201,7 @@ typedef struct RumPageItemsStateData
201201
* On the {leaf, data} page, this is the number of
202202
* RumItem structures that are in the compressed posting list.
203203
*
204-
* On the {data} page, this is the number ofPostingItem structures.
204+
* On the {data} page, this is the number ofRumPostingItem structures.
205205
*
206206
* On the {leaf} page, this is the number of IndexTuple, each of
207207
* which contains a compressed posting list. In this case, the size
@@ -218,7 +218,7 @@ typedef struct RumPageItemsStateData
218218
* It is used where posting lists are scanned.
219219
* Sometimes only the RumItem it contains is used.
220220
*/
221-
PostingItemcurPitem;
221+
RumPostingItemcurPitem;
222222

223223
/* Current IndexTuple on the page */
224224
IndexTuplecurItup;
@@ -601,17 +601,13 @@ get_positions_to_text_datum(Datum addInfo)
601601
staticOid
602602
get_cur_tuple_key_oid(RumPageItemsStatepiState)
603603
{
604-
Oidresult;
605604
TupleDescorigTupleDesc;
606605
OffsetNumberattnum;
607-
FormData_pg_attribute*attrs;
608606

609607
attnum=piState->curKeyAttnum;
610608
origTupleDesc=piState->rumState->origTupdesc;
611-
attrs=origTupleDesc->attrs;
612-
result= (attrs[attnum-1]).atttypid;
613609

614-
returnresult;
610+
returnTupleDescAttr(origTupleDesc,attnum-1)->atttypid;
615611
}
616612

617613
/*
@@ -638,8 +634,8 @@ get_entry_index_tuple_values(RumPageItemsState piState)
638634
if (piState->pageType==LEAF_ENTRY_PAGE&&
639635
RumGetAddInfoAttr(piState))
640636
{
641-
(piState)->curKeyAddInfoOid=RumGetAddInfoAttr(piState)->atttypid;
642-
(piState)->curKeyAddInfoByval=RumGetAddInfoAttr(piState)->attbyval;
637+
piState->curKeyAddInfoOid=RumGetAddInfoAttr(piState)->atttypid;
638+
piState->curKeyAddInfoByval=RumGetAddInfoAttr(piState)->attbyval;
643639
}
644640
}
645641

@@ -687,7 +683,7 @@ find_page_in_posting_tree(BlockNumber targetPageNum,
687683
{
688684
PagecurPage;
689685
RumPageOpaquecurOpaq;
690-
PostingItemcurPitem;
686+
RumPostingItemcurPitem;
691687
BlockNumbernextPageNum;
692688

693689
/* Page loop */
@@ -713,21 +709,21 @@ find_page_in_posting_tree(BlockNumber targetPageNum,
713709
}
714710

715711
/*
716-
* Reading the firstPostingItem from the current page. This is
712+
* Reading the firstRumPostingItem from the current page. This is
717713
* necessary to remember the link down.
718714
*/
719715
memcpy(&curPitem,
720-
RumDataPageGetItem(curPage,1),sizeof(PostingItem));
721-
nextPageNum=PostingItemGetBlockNumber(&curPitem);
716+
RumDataPageGetItem(curPage,1),sizeof(RumPostingItem));
717+
nextPageNum=RumPostingItemGetBlockNumber(&curPitem);
722718

723719
/* The loop that scans the page */
724720
for (inti=1;i <=curOpaq->maxoff;i++)
725721
{
726-
/* Reading thePostingItem from the current page */
722+
/* Reading theRumPostingItem from the current page */
727723
memcpy(&curPitem,
728-
RumDataPageGetItem(curPage,i),sizeof(PostingItem));
724+
RumDataPageGetItem(curPage,i),sizeof(RumPostingItem));
729725

730-
if (targetPageNum==PostingItemGetBlockNumber(&curPitem))
726+
if (targetPageNum==RumPostingItemGetBlockNumber(&curPitem))
731727
{
732728
pfree(curPage);
733729
return true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp