Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
53b2e004
Commit
53b2e004
authored
23 years ago
by
Hiroshi Inoue
Browse files
Options
Downloads
Patches
Plain Diff
Keep the contents of ItemPointerData not the pointers so that
per tuple memory context doesn't discard them.
parent
793bcc67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/executor/nodeTidscan.c
+11
-16
11 additions, 16 deletions
src/backend/executor/nodeTidscan.c
src/include/nodes/execnodes.h
+2
-2
2 additions, 2 deletions
src/include/nodes/execnodes.h
with
13 additions
and
18 deletions
src/backend/executor/nodeTidscan.c
+
11
−
16
View file @
53b2e004
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.1
8
2001/0
6
/2
2 19:16:22 wieck
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeTidscan.c,v 1.1
9
2001/0
9
/2
9 07:57:06 inoue
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,11 +29,11 @@
#include
"access/heapam.h"
#include
"parser/parsetree.h"
static
int
TidListCreate
(
List
*
,
ExprContext
*
,
ItemPointer
*
);
static
int
TidListCreate
(
List
*
,
ExprContext
*
,
ItemPointer
Data
[]
);
static
TupleTableSlot
*
TidNext
(
TidScan
*
node
);
static
int
TidListCreate
(
List
*
evalList
,
ExprContext
*
econtext
,
ItemPointer
*
tidList
)
TidListCreate
(
List
*
evalList
,
ExprContext
*
econtext
,
ItemPointer
Data
tidList
[]
)
{
List
*
lst
;
ItemPointer
itemptr
;
...
...
@@ -49,7 +49,7 @@ TidListCreate(List *evalList, ExprContext *econtext, ItemPointer *tidList)
NULL
));
if
(
!
isNull
&&
itemptr
&&
ItemPointerIsValid
(
itemptr
))
{
tidList
[
numTids
]
=
itemptr
;
tidList
[
numTids
]
=
*
itemptr
;
numTids
++
;
}
}
...
...
@@ -80,8 +80,7 @@ TidNext(TidScan *node)
bool
bBackward
;
int
tidNumber
;
ItemPointer
*
tidList
,
itemptr
;
ItemPointerData
*
tidList
;
/*
* extract necessary information from tid scan node
...
...
@@ -146,14 +145,10 @@ TidNext(TidScan *node)
{
bool
slot_is_valid
=
false
;
itemptr
=
tidList
[
tidstate
->
tss_TidPtr
];
tuple
->
t_datamcxt
=
NULL
;
tuple
->
t_data
=
NULL
;
if
(
itemptr
)
{
tuple
->
t_self
=
*
(
itemptr
);
heap_fetch
(
heapRelation
,
snapshot
,
tuple
,
&
buffer
,
NULL
);
}
tuple
->
t_self
=
tidList
[
tidstate
->
tss_TidPtr
];
heap_fetch
(
heapRelation
,
snapshot
,
tuple
,
&
buffer
,
NULL
);
if
(
tuple
->
t_data
!=
NULL
)
{
bool
prev_matches
=
false
;
...
...
@@ -187,7 +182,7 @@ TidNext(TidScan *node)
for
(
prev_tid
=
0
;
prev_tid
<
tidstate
->
tss_TidPtr
;
prev_tid
++
)
{
if
(
ItemPointerEquals
(
tidList
[
prev_tid
],
&
tuple
->
t_self
))
if
(
ItemPointerEquals
(
&
tidList
[
prev_tid
],
&
tuple
->
t_self
))
{
prev_matches
=
true
;
break
;
...
...
@@ -254,7 +249,7 @@ ExecTidReScan(TidScan *node, ExprContext *exprCtxt, Plan *parent)
{
EState
*
estate
;
TidScanState
*
tidstate
;
ItemPointer
*
tidList
;
ItemPointer
Data
*
tidList
;
tidstate
=
node
->
tidstate
;
estate
=
node
->
scan
.
plan
.
state
;
...
...
@@ -381,7 +376,7 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
{
TidScanState
*
tidstate
;
CommonScanState
*
scanstate
;
ItemPointer
*
tidList
;
ItemPointer
Data
*
tidList
;
int
numTids
;
int
tidPtr
;
List
*
rangeTable
;
...
...
@@ -436,7 +431,7 @@ ExecInitTidScan(TidScan *node, EState *estate, Plan *parent)
/*
* get the tid node information
*/
tidList
=
(
ItemPointer
*
)
palloc
(
length
(
node
->
tideval
)
*
sizeof
(
ItemPointer
));
tidList
=
(
ItemPointer
Data
*
)
palloc
(
length
(
node
->
tideval
)
*
sizeof
(
ItemPointer
Data
));
numTids
=
0
;
if
(
!
node
->
needRescan
)
numTids
=
TidListCreate
(
node
->
tideval
,
scanstate
->
cstate
.
cs_ExprContext
,
tidList
);
...
...
This diff is collapsed.
Click to expand it.
src/include/nodes/execnodes.h
+
2
−
2
View file @
53b2e004
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: execnodes.h,v 1.6
2
2001/0
7/16 05:07:00 tgl
Exp $
* $Id: execnodes.h,v 1.6
3
2001/0
9/29 07:57:04 inoue
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -461,7 +461,7 @@ typedef struct TidScanState
int
tss_NumTids
;
int
tss_TidPtr
;
int
tss_MarkTidPtr
;
ItemPointer
*
tss_TidList
;
ItemPointer
Data
*
tss_TidList
;
HeapTupleData
tss_htup
;
}
TidScanState
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment