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

Commit25e0475

Browse files
author
Artur Zakirov
committed
We do not need gingettuple and ginsort.h/ginsort.c
1 parent7626967 commit25e0475

File tree

3 files changed

+58
-60
lines changed

3 files changed

+58
-60
lines changed

‎Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# contrib/rum/Makefile
22

33
MODULE_big = rum
4-
OBJS = ginsort.o\
5-
ginarrayproc.o ginbtree.o ginbulk.o gindatapage.o\
4+
OBJS = ginarrayproc.o ginbtree.o ginbulk.o gindatapage.o\
65
ginentrypage.o ginfast.o ginget.o gininsert.o\
76
ginscan.o ginutil.o ginvacuum.o$(WIN32RES)
87

‎ginget.c

Lines changed: 56 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include"postgres.h"
16-
#include"ginsort.h"
1716

1817
#include"access/relscan.h"
1918
#include"miscadmin.h"
@@ -2188,60 +2187,60 @@ insertScanItem(GinScanOpaque so, bool recheck)
21882187
tuplesort_putgin(so->sortstate,item);
21892188
}
21902189

2191-
Datum
2192-
gingettuple(PG_FUNCTION_ARGS)
2193-
{
2194-
IndexScanDescscan= (IndexScanDesc)PG_GETARG_POINTER(0);
2195-
boolrecheck;
2196-
GinScanOpaqueso= (GinScanOpaque)scan->opaque;
2197-
GinSortItem*item;
2198-
boolshould_free;
2199-
2200-
if (so->firstCall)
2201-
{
2202-
so->norderbys=scan->numberOfOrderBys;
2203-
2204-
/*
2205-
* Set up the scan keys, and check for unsatisfiable query.
2206-
*/
2207-
if (GinIsNewKey(scan))
2208-
ginNewScanKey(scan);
2209-
2210-
if (GinIsVoidRes(scan))
2211-
PG_RETURN_INT64(0);
2212-
2213-
so->tbm=NULL;
2214-
so->entriesIncrIndex=-1;
2215-
so->firstCall= false;
2216-
so->sortstate=tuplesort_begin_gin(work_mem,so->norderbys, false);
2217-
2218-
scanPendingInsert(scan);
2219-
2220-
/*
2221-
* Now scan the main index.
2222-
*/
2223-
startScan(scan);
2224-
2225-
while (scanGetItem(scan,&so->iptr,&so->iptr,&recheck))
2226-
{
2227-
insertScanItem(so,recheck);
2228-
}
2229-
tuplesort_performsort(so->sortstate);
2230-
}
2231-
2232-
item=tuplesort_getgin(so->sortstate, true,&should_free);
2233-
if (item)
2234-
{
2235-
scan->xs_ctup.t_self=item->iptr;
2236-
scan->xs_recheck=item->recheck;
2237-
2238-
if (should_free)
2239-
pfree(item);
2240-
PG_RETURN_BOOL(true);
2241-
}
2242-
else
2243-
{
2244-
PG_RETURN_BOOL(false);
2245-
}
2246-
}
2190+
//Datum
2191+
//gingettuple(PG_FUNCTION_ARGS)
2192+
//{
2193+
//IndexScanDesc scan = (IndexScanDesc) PG_GETARG_POINTER(0);
2194+
//boolrecheck;
2195+
//GinScanOpaque so = (GinScanOpaque)scan->opaque;
2196+
//GinSortItem *item;
2197+
//boolshould_free;
2198+
//
2199+
//if (so->firstCall)
2200+
//{
2201+
//so->norderbys = scan->numberOfOrderBys;
2202+
//
2203+
///*
2204+
// * Set up the scan keys, and check for unsatisfiable query.
2205+
// */
2206+
//if (GinIsNewKey(scan))
2207+
//ginNewScanKey(scan);
2208+
//
2209+
//if (GinIsVoidRes(scan))
2210+
//PG_RETURN_INT64(0);
2211+
//
2212+
//so->tbm = NULL;
2213+
//so->entriesIncrIndex = -1;
2214+
//so->firstCall = false;
2215+
//so->sortstate = tuplesort_begin_gin(work_mem, so->norderbys, false);
2216+
//
2217+
//scanPendingInsert(scan);
2218+
//
2219+
///*
2220+
// * Now scan the main index.
2221+
// */
2222+
//startScan(scan);
2223+
//
2224+
//while (scanGetItem(scan, &so->iptr, &so->iptr, &recheck))
2225+
//{
2226+
//insertScanItem(so, recheck);
2227+
//}
2228+
//tuplesort_performsort(so->sortstate);
2229+
//}
2230+
//
2231+
//item = tuplesort_getgin(so->sortstate, true, &should_free);
2232+
//if (item)
2233+
//{
2234+
//scan->xs_ctup.t_self = item->iptr;
2235+
//scan->xs_recheck = item->recheck;
2236+
//
2237+
//if (should_free)
2238+
//pfree(item);
2239+
//PG_RETURN_BOOL(true);
2240+
//}
2241+
//else
2242+
//{
2243+
//PG_RETURN_BOOL(false);
2244+
//}
2245+
//}
22472246

‎rum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ extern void ginNewScanKey(IndexScanDesc scan);
794794

795795
/* ginget.c */
796796
externint64gingetbitmap(IndexScanDescscan,TIDBitmap*tbm);
797-
externDatumgingettuple(PG_FUNCTION_ARGS);
797+
//extern Datum gingettuple(PG_FUNCTION_ARGS);
798798

799799
/* ginvacuum.c */
800800
externIndexBulkDeleteResult*ginbulkdelete(IndexVacuumInfo*info,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp