8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.16 2001/03/22 06:16:13 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.16.2.1 2001/10/01 09:38:14 inoue Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
29
29
#include "access/heapam.h"
30
30
#include "parser/parsetree.h"
31
31
32
- static int TidListCreate (List * , ExprContext * , ItemPointer * );
32
+ static int TidListCreate (List * , ExprContext * , ItemPointerData [] );
33
33
static TupleTableSlot * TidNext (TidScan * node );
34
34
35
35
static int
36
- TidListCreate (List * evalList , ExprContext * econtext , ItemPointer * tidList )
36
+ TidListCreate (List * evalList , ExprContext * econtext , ItemPointerData tidList [] )
37
37
{
38
38
List * lst ;
39
39
ItemPointer itemptr ;
@@ -49,7 +49,7 @@ TidListCreate(List *evalList, ExprContext *econtext, ItemPointer *tidList)
49
49
NULL ));
50
50
if (!isNull && itemptr && ItemPointerIsValid (itemptr ))
51
51
{
52
- tidList [numTids ] = itemptr ;
52
+ tidList [numTids ] = * itemptr ;
53
53
numTids ++ ;
54
54
}
55
55
}
@@ -80,8 +80,7 @@ TidNext(TidScan *node)
80
80
81
81
bool bBackward ;
82
82
int tidNumber ;
83
- ItemPointer * tidList ,
84
- itemptr ;
83
+ ItemPointerData * tidList ;
85
84
86
85
/*
87
86
* extract necessary information from tid scan node
@@ -146,14 +145,10 @@ TidNext(TidScan *node)
146
145
{
147
146
bool slot_is_valid = false;
148
147
149
- itemptr = tidList [tidstate -> tss_TidPtr ];
150
148
tuple -> t_datamcxt = NULL ;
151
149
tuple -> t_data = NULL ;
152
- if (itemptr )
153
- {
154
- tuple -> t_self = * (itemptr );
155
- heap_fetch (heapRelation , snapshot , tuple , & buffer );
156
- }
150
+ tuple -> t_self = tidList [tidstate -> tss_TidPtr ];
151
+ heap_fetch (heapRelation , snapshot , tuple , & buffer );
157
152
if (tuple -> t_data != NULL )
158
153
{
159
154
bool prev_matches = false;
@@ -187,7 +182,7 @@ TidNext(TidScan *node)
187
182
for (prev_tid = 0 ; prev_tid < tidstate -> tss_TidPtr ;
188
183
prev_tid ++ )
189
184
{
190
- if (ItemPointerEquals (tidList [prev_tid ], & tuple -> t_self ))
185
+ if (ItemPointerEquals (& tidList [prev_tid ], & tuple -> t_self ))
191
186
{
192
187
prev_matches = true;
193
188
break ;
@@ -254,7 +249,7 @@ ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent)
254
249
{
255
250
EState * estate ;
256
251
TidScanState * tidstate ;
257
- ItemPointer * tidList ;
252
+ ItemPointerData * tidList ;
258
253
259
254
tidstate = node -> tidstate ;
260
255
estate = node -> scan .plan .state ;
@@ -381,7 +376,7 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
381
376
{
382
377
TidScanState * tidstate ;
383
378
CommonScanState * scanstate ;
384
- ItemPointer * tidList ;
379
+ ItemPointerData * tidList ;
385
380
int numTids ;
386
381
int tidPtr ;
387
382
List * rangeTable ;
@@ -436,7 +431,7 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
436
431
/*
437
432
* get the tid node information
438
433
*/
439
- tidList = (ItemPointer * ) palloc (length (node -> tideval ) * sizeof (ItemPointer ));
434
+ tidList = (ItemPointerData * ) palloc (length (node -> tideval ) * sizeof (ItemPointerData ));
440
435
numTids = 0 ;
441
436
if (!node -> needRescan )
442
437
numTids = TidListCreate (node -> tideval , scanstate -> cstate .cs_ExprContext , tidList );
0 commit comments