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
d38767fc
Commit
d38767fc
authored
28 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Add prototypes and remove unused variables from btree Fastbuild patch.
parent
3eba7651
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backend/access/nbtree/nbtsort.c
+2
-17
2 additions, 17 deletions
src/backend/access/nbtree/nbtsort.c
src/include/access/nbtree.h
+19
-2
19 additions, 2 deletions
src/include/access/nbtree.h
with
21 additions
and
19 deletions
src/backend/access/nbtree/nbtsort.c
+
2
−
17
View file @
d38767fc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: nbtsort.c,v 1.
9
1997/02/1
2 05:04:20 scrappy
Exp $
* $Id: nbtsort.c,v 1.
10
1997/02/1
4 22:47:19 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -596,7 +596,6 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
...
@@ -596,7 +596,6 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
BTSpool
*
btspool
=
(
BTSpool
*
)
spool
;
BTSpool
*
btspool
=
(
BTSpool
*
)
spool
;
BTTapeBlock
*
itape
;
BTTapeBlock
*
itape
;
Size
itemsz
;
Size
itemsz
;
int
i
;
itape
=
btspool
->
bts_itape
[
btspool
->
bts_tape
];
itape
=
btspool
->
bts_itape
[
btspool
->
bts_tape
];
itemsz
=
BTITEMSZ
(
btitem
);
itemsz
=
BTITEMSZ
(
btitem
);
...
@@ -636,7 +635,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
...
@@ -636,7 +635,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
*/
*/
_bt_isortcmpinit
(
index
);
_bt_isortcmpinit
(
index
);
qsort
((
void
*
)
parray
,
itape
->
bttb_ntup
,
sizeof
(
BTSortKey
),
qsort
((
void
*
)
parray
,
itape
->
bttb_ntup
,
sizeof
(
BTSortKey
),
_bt_isortcmp
);
(
int
(
*
)(
const
void
*
,
const
void
*
))
_bt_isortcmp
);
}
}
/*
/*
...
@@ -743,17 +742,6 @@ _bt_slideleft(Relation index, Buffer buf, Page page)
...
@@ -743,17 +742,6 @@ _bt_slideleft(Relation index, Buffer buf, Page page)
}
}
}
}
typedef
struct
BTPageState
{
Buffer
btps_buf
;
Page
btps_page
;
BTItem
btps_lastbti
;
OffsetNumber
btps_lastoff
;
OffsetNumber
btps_firstoff
;
int
btps_level
;
bool
btps_doupper
;
struct
BTPageState
*
btps_next
;
}
BTPageState
;
/*
/*
* allocate and initialize a new BTPageState. the returned structure
* allocate and initialize a new BTPageState. the returned structure
* is suitable for immediate use by _bt_buildadd.
* is suitable for immediate use by _bt_buildadd.
...
@@ -841,7 +829,6 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
...
@@ -841,7 +829,6 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
BTPageState
*
state
=
(
BTPageState
*
)
pstate
;
BTPageState
*
state
=
(
BTPageState
*
)
pstate
;
Buffer
nbuf
;
Buffer
nbuf
;
Page
npage
;
Page
npage
;
char
*
pos
;
BTItem
last_bti
;
BTItem
last_bti
;
OffsetNumber
first_off
;
OffsetNumber
first_off
;
OffsetNumber
last_off
;
OffsetNumber
last_off
;
...
@@ -1060,8 +1047,6 @@ _bt_merge(Relation index, BTSpool *btspool)
...
@@ -1060,8 +1047,6 @@ _bt_merge(Relation index, BTSpool *btspool)
int
nruns
;
int
nruns
;
Size
btisz
;
Size
btisz
;
bool
doleaf
=
false
;
bool
doleaf
=
false
;
BTPageState
*
s
;
BTPageOpaque
*
opaque
;
/*
/*
* initialize state needed for the merge into the btree leaf pages.
* initialize state needed for the merge into the btree leaf pages.
...
...
This diff is collapsed.
Click to expand it.
src/include/access/nbtree.h
+
19
−
2
View file @
d38767fc
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nbtree.h,v 1.
6
1997/02/1
2 05:04:28 scrappy
Exp $
* $Id: nbtree.h,v 1.
7
1997/02/1
4 22:47:36 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -114,6 +114,17 @@ typedef struct BTStackData {
...
@@ -114,6 +114,17 @@ typedef struct BTStackData {
typedef
BTStackData
*
BTStack
;
typedef
BTStackData
*
BTStack
;
typedef
struct
BTPageState
{
Buffer
btps_buf
;
Page
btps_page
;
BTItem
btps_lastbti
;
OffsetNumber
btps_lastoff
;
OffsetNumber
btps_firstoff
;
int
btps_level
;
bool
btps_doupper
;
struct
BTPageState
*
btps_next
;
}
BTPageState
;
/*
/*
* We need to be able to tell the difference between read and write
* We need to be able to tell the difference between read and write
* requests for pages, in order to do locking correctly.
* requests for pages, in order to do locking correctly.
...
@@ -227,7 +238,9 @@ extern void btdelete(Relation rel, ItemPointer tid);
...
@@ -227,7 +238,9 @@ extern void btdelete(Relation rel, ItemPointer tid);
*/
*/
extern
void
_bt_regscan
(
IndexScanDesc
scan
);
extern
void
_bt_regscan
(
IndexScanDesc
scan
);
extern
void
_bt_dropscan
(
IndexScanDesc
scan
);
extern
void
_bt_dropscan
(
IndexScanDesc
scan
);
extern
void
_bt_adjscans
(
Relation
rel
,
ItemPointer
tid
,
int
op
);
extern
void
_bt_adjscans
(
Relation
rel
,
ItemPointer
tid
);
extern
void
_bt_scandel
(
IndexScanDesc
scan
,
BlockNumber
blkno
,
OffsetNumber
offno
);
extern
bool
_bt_scantouched
(
IndexScanDesc
scan
,
BlockNumber
blkno
,
OffsetNumber
offno
);
/*
/*
* prototypes for functions in nbtsearch.c
* prototypes for functions in nbtsearch.c
...
@@ -268,6 +281,10 @@ extern BTItem _bt_formitem(IndexTuple itup);
...
@@ -268,6 +281,10 @@ extern BTItem _bt_formitem(IndexTuple itup);
* prototypes for functions in nbtsort.c
* prototypes for functions in nbtsort.c
*/
*/
extern
void
*
_bt_spoolinit
(
Relation
index
,
int
ntapes
);
extern
void
*
_bt_spoolinit
(
Relation
index
,
int
ntapes
);
extern
void
*
_bt_pagestate
(
Relation
index
,
int
flags
,
int
level
,
bool
doupper
);
extern
BTItem
_bt_minitem
(
Page
opage
,
BlockNumber
oblkno
,
int
atend
);
extern
BTItem
_bt_buildadd
(
Relation
index
,
void
*
pstate
,
BTItem
bti
,
int
flags
);
extern
void
_bt_uppershutdown
(
Relation
index
,
BTPageState
*
state
);
extern
void
_bt_spooldestroy
(
void
*
spool
);
extern
void
_bt_spooldestroy
(
void
*
spool
);
extern
void
_bt_spool
(
Relation
index
,
BTItem
btitem
,
void
*
spool
);
extern
void
_bt_spool
(
Relation
index
,
BTItem
btitem
,
void
*
spool
);
extern
void
_bt_upperbuild
(
Relation
index
);
extern
void
_bt_upperbuild
(
Relation
index
);
...
...
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