Skip to content

Commit ba61d64

Browse files
committed
Improve support PostgreSQL 11devel
1 parent c975d3c commit ba61d64

File tree

11 files changed

+90
-88
lines changed

11 files changed

+90
-88
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OBJS = src/rumsort.o src/rum_ts_utils.o src/rumtsquery.o \
1313

1414
DATA = rum--1.0.sql
1515
DATA_updates = rum--1.0--1.1.sql rum--1.1--1.2.sql
16-
DATA_built = rum--$(EXTVERSION).sql $(DATA_updates)
16+
SQL_built = rum--$(EXTVERSION).sql $(DATA_updates)
1717

1818
INCLUDES = rum.h rumsort.h
1919
RELATIVE_INCLUDES = $(addprefix src/, $(INCLUDES))
@@ -47,7 +47,7 @@ endif
4747
wal-check: temp-install
4848
$(prove_check)
4949

50-
all: rum--$(EXTVERSION).sql
50+
all: $(SQL_built)
5151

5252
#9.6 requires 1.2 file but 10.0 could live with update files
5353
rum--$(EXTVERSION).sql: $(DATA) $(DATA_updates)
@@ -62,11 +62,13 @@ install: installincludes
6262
installincludes:
6363
$(INSTALL) -d '$(DESTDIR)$(includedir_server)/'
6464
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(RELATIVE_INCLUDES)) '$(DESTDIR)$(includedir_server)/'
65+
$(INSTALL_DATA) $(SQL_built) '$(DESTDIR)$(datadir)/$(datamoduledir)/'
6566

6667
uninstall: uninstallincludes
6768

6869
uninstallincludes:
6970
rm -f $(addprefix '$(DESTDIR)$(includedir_server)/', $(INCLUDES))
71+
rm -f $(addprefix '$(DESTDIR)$(datadir)/$(datamoduledir)'/, $(notdir $(SQL_built)))
7072

7173
ISOLATIONCHECKS= predicate-rum predicate-rum-2
7274

src/rum_ts_utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ rum_tsquery_pre_consistent(PG_FUNCTION_ARGS)
171171

172172
Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4);
173173
bool recheck;
174-
bool res = FALSE;
174+
bool res = false;
175175

176176
if (query->size > 0)
177177
{
@@ -268,7 +268,7 @@ rum_tsquery_consistent(PG_FUNCTION_ARGS)
268268
bool *recheck = (bool *) PG_GETARG_POINTER(5);
269269
Datum *addInfo = (Datum *) PG_GETARG_POINTER(8);
270270
bool *addInfoIsNull = (bool *) PG_GETARG_POINTER(9);
271-
bool res = FALSE;
271+
bool res = false;
272272

273273
/*
274274
* The query requires recheck only if it involves weights
@@ -313,7 +313,7 @@ rum_tsquery_timestamp_consistent(PG_FUNCTION_ARGS)
313313
bool *recheck = (bool *) PG_GETARG_POINTER(5);
314314
Datum *addInfo = (Datum *) PG_GETARG_POINTER(8);
315315
bool *addInfoIsNull = (bool *) PG_GETARG_POINTER(9);
316-
bool res = FALSE;
316+
bool res = false;
317317

318318
/*
319319
* The query requires recheck only if it involves weights

src/rumbtree.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ rumTraverseLock(Buffer buffer, bool searchMode)
3232
page = BufferGetPage(buffer);
3333
if (RumPageIsLeaf(page))
3434
{
35-
if (searchMode == FALSE)
35+
if (searchMode == false)
3636
{
3737
/* we should relock our page */
3838
LockBuffer(buffer, RUM_UNLOCK);
@@ -120,7 +120,7 @@ rumReFindLeafPage(RumBtree btree, RumBtreeStack * stack)
120120
RumBtreeStack *
121121
rumFindLeafPage(RumBtree btree, RumBtreeStack * stack)
122122
{
123-
bool isfirst = TRUE;
123+
bool isfirst = true;
124124
BlockNumber rootBlkno;
125125

126126
if (!stack)
@@ -141,7 +141,7 @@ rumFindLeafPage(RumBtree btree, RumBtreeStack * stack)
141141
{
142142
if (RumPageIsLeaf(page) && !btree->searchMode)
143143
access = RUM_EXCLUSIVE;
144-
isfirst = FALSE;
144+
isfirst = false;
145145
}
146146
else
147147
access = rumTraverseLock(stack->buffer, btree->searchMode);
@@ -150,7 +150,7 @@ rumFindLeafPage(RumBtree btree, RumBtreeStack * stack)
150150
* ok, page is correctly locked, we should check to move right ..,
151151
* root never has a right link, so small optimization
152152
*/
153-
while (btree->fullScan == FALSE && stack->blkno != rootBlkno &&
153+
while (btree->fullScan == false && stack->blkno != rootBlkno &&
154154
btree->isMoveRight(btree, page))
155155
{
156156
BlockNumber rightlink = RumPageGetOpaque(page)->rightlink;
@@ -605,7 +605,7 @@ rumInsertValue(Relation index, RumBtree btree, RumBtreeStack * stack,
605605
}
606606
}
607607

608-
btree->isDelete = FALSE;
608+
btree->isDelete = false;
609609

610610
/* search parent to lock */
611611
LockBuffer(parent->buffer, RUM_EXCLUSIVE);

src/rumbulk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ rumCombineData(RBNode *existing, const RBNode *newdata, void *arg)
5656
Assert(res != 0);
5757

5858
if (res > 0)
59-
eo->shouldSort = TRUE;
59+
eo->shouldSort = true;
6060
}
6161

6262
eo->list[eo->count] = en->list[0];

src/rumdatapage.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ dataLocateLeafItem(RumBtree btree, RumBtreeStack * stack)
631631
if (btree->fullScan)
632632
{
633633
stack->off = FirstOffsetNumber;
634-
return TRUE;
634+
return true;
635635
}
636636

637637
return findInLeafPage(btree, page, &stack->off, &iptr, &ptr);
@@ -1460,10 +1460,10 @@ rumPrepareDataScan(RumBtree btree, Relation index, OffsetNumber attnum, RumState
14601460
btree->splitPage = dataSplitPage;
14611461
btree->fillRoot = rumDataFillRoot;
14621462

1463-
btree->isData = TRUE;
1464-
btree->searchMode = FALSE;
1465-
btree->isDelete = FALSE;
1466-
btree->fullScan = FALSE;
1463+
btree->isData = true;
1464+
btree->searchMode = false;
1465+
btree->isDelete = false;
1466+
btree->fullScan = false;
14671467
btree->scanDirection = ForwardScanDirection;
14681468

14691469
btree->entryAttnum = attnum;

src/rumentrypage.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ entryIsMoveRight(RumBtree btree, Page page)
125125
RumNullCategory category;
126126

127127
if (RumPageRightMost(page))
128-
return FALSE;
128+
return false;
129129

130130
itup = getRightMostTuple(page);
131131
attnum = rumtuple_get_attrnum(btree->rumstate, itup);
@@ -134,9 +134,9 @@ entryIsMoveRight(RumBtree btree, Page page)
134134
if (rumCompareAttEntries(btree->rumstate,
135135
btree->entryAttnum, btree->entryKey, btree->entryCategory,
136136
attnum, key, category) > 0)
137-
return TRUE;
137+
return true;
138138

139-
return FALSE;
139+
return false;
140140
}
141141

142142
/*
@@ -232,7 +232,7 @@ entryLocateLeafEntry(RumBtree btree, RumBtreeStack * stack)
232232
if (btree->fullScan)
233233
{
234234
stack->off = FirstOffsetNumber;
235-
return TRUE;
235+
return true;
236236
}
237237

238238
low = FirstOffsetNumber;
@@ -558,12 +558,12 @@ rumPrepareEntryScan(RumBtree btree, OffsetNumber attnum,
558558
btree->splitPage = entrySplitPage;
559559
btree->fillRoot = rumEntryFillRoot;
560560

561-
btree->isData = FALSE;
562-
btree->searchMode = FALSE;
563-
btree->fullScan = FALSE;
561+
btree->isData = false;
562+
btree->searchMode = false;
563+
btree->fullScan = false;
564564

565565
btree->entryAttnum = attnum;
566566
btree->entryKey = key;
567567
btree->entryCategory = category;
568-
btree->isDelete = FALSE;
568+
btree->isDelete = false;
569569
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy