Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4eadfe87
Commit
4eadfe87
authored
May 25, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 0x007f -> (unsigned)0x7f to make pgindent happy.
parent
519cd36d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
84 additions
and
77 deletions
+84
-77
contrib/os2client/config.h
contrib/os2client/config.h
+1
-1
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtinsert.c
+11
-10
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtpage.c
+5
-4
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtree.c
+7
-6
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtscan.c
+5
-4
src/backend/optimizer/path/_deadcode/predmig.c
src/backend/optimizer/path/_deadcode/predmig.c
+2
-2
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+2
-2
src/backend/storage/buffer/s_lock.c
src/backend/storage/buffer/s_lock.c
+2
-2
src/backend/tioga/tgRecipe.h
src/backend/tioga/tgRecipe.h
+2
-1
src/backend/utils/adt/numeric.c
src/backend/utils/adt/numeric.c
+33
-33
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/ruleutils.c
+2
-2
src/backend/utils/mb/big5.c
src/backend/utils/mb/big5.c
+5
-5
src/backend/utils/mb/conv.c
src/backend/utils/mb/conv.c
+2
-2
src/include/access/nbtree.h
src/include/access/nbtree.h
+3
-2
src/include/access/strat.h
src/include/access/strat.h
+2
-1
No files found.
contrib/os2client/config.h
View file @
4eadfe87
...
...
@@ -11,7 +11,7 @@
* DEF_PGPORT is the TCP port number on which the Postmaster listens by
* default. This can be overriden by command options, environment variables,
* and the postconfig hook. (set by build script)
*/
*/
#define DEF_PGPORT "5432"
...
...
src/backend/access/nbtree/nbtinsert.c
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.4
1 1999/05/25 18:20:28 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.4
2 1999/05/25 22:04:11 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -68,6 +68,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
LockBuffer
(
buf
,
BT_WRITE
);
l1:
/*
* If the page was split between the time that we surrendered our read
* lock and acquired our write lock, then this page may no longer be
...
...
@@ -96,13 +97,13 @@ l1:
/* key on the page before trying to compare it */
if
(
!
PageIsEmpty
(
page
)
&&
offset
<=
maxoff
)
{
TupleDesc
itupdesc
;
BTItem
cbti
;
HeapTupleData
htup
;
BTPageOpaque
opaque
;
Buffer
nbuf
;
BlockNumber
nblkno
;
bool
chtup
=
true
;
TupleDesc
itupdesc
;
BTItem
cbti
;
HeapTupleData
htup
;
BTPageOpaque
opaque
;
Buffer
nbuf
;
BlockNumber
nblkno
;
bool
chtup
=
true
;
itupdesc
=
RelationGetDescr
(
rel
);
nbuf
=
InvalidBuffer
;
...
...
@@ -155,7 +156,7 @@ l1:
_bt_relbuf
(
rel
,
buf
,
BT_WRITE
);
XactLockTableWait
(
xwait
);
buf
=
_bt_getbuf
(
rel
,
blkno
,
BT_WRITE
);
goto
l1
;
/* continue from the begin */
goto
l1
;
/* continue from the begin */
}
elog
(
ERROR
,
"Cannot insert a duplicate key into a unique index"
);
}
...
...
@@ -178,7 +179,7 @@ l1:
nblkno
=
opaque
->
btpo_next
;
if
(
nbuf
!=
InvalidBuffer
)
_bt_relbuf
(
rel
,
nbuf
,
BT_READ
);
for
(
nbuf
=
InvalidBuffer
;
;
)
for
(
nbuf
=
InvalidBuffer
;
;
)
{
nbuf
=
_bt_getbuf
(
rel
,
nblkno
,
BT_READ
);
page
=
BufferGetPage
(
nbuf
);
...
...
src/backend/access/nbtree/nbtpage.c
View file @
4eadfe87
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.2
2 1999/05/25 18:20:29 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.2
3 1999/05/25 22:04:12 momjian
Exp $
*
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
...
...
@@ -315,9 +315,10 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
}
else
{
/*
* Extend bufmgr code is unclean and so we have to
*
use locking
here.
* Extend bufmgr code is unclean and so we have to
use locking
* here.
*/
LockPage
(
rel
,
0
,
ExclusiveLock
);
buf
=
ReadBuffer
(
rel
,
blkno
);
...
...
@@ -416,7 +417,7 @@ _bt_metaproot(Relation rel, BlockNumber rootbknum, int level)
Assert
(
metaopaque
->
btpo_flags
&
BTP_META
);
metad
=
BTPageGetMeta
(
metap
);
metad
->
btm_root
=
rootbknum
;
if
(
level
==
0
)
/* called from _do_insert */
if
(
level
==
0
)
/* called from _do_insert */
metad
->
btm_level
+=
1
;
else
metad
->
btm_level
=
level
;
/* called from btsort */
...
...
src/backend/access/nbtree/nbtree.c
View file @
4eadfe87
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.
39 1999/05/25 18:20:29 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.
40 1999/05/25 22:04:13 momjian
Exp $
*
* NOTES
* This file contains only the public interface routines.
...
...
@@ -402,9 +402,9 @@ btgettuple(IndexScanDesc scan, ScanDirection dir)
else
res
=
_bt_first
(
scan
,
dir
);
/*
* Save heap TID to use it in _bt_restscan.
*
Unlock buffer before
leaving index !
/*
* Save heap TID to use it in _bt_restscan.
Unlock buffer before
* leaving index !
*/
if
(
res
)
{
...
...
@@ -565,7 +565,7 @@ btmarkpos(IndexScanDesc scan)
if
(
ItemPointerIsValid
(
&
(
scan
->
currentItemData
)))
{
so
->
btso_mrkbuf
=
ReadBuffer
(
scan
->
relation
,
BufferGetBlockNumber
(
so
->
btso_curbuf
));
BufferGetBlockNumber
(
so
->
btso_curbuf
));
scan
->
currentMarkData
=
scan
->
currentItemData
;
so
->
mrkHeapIptr
=
so
->
curHeapIptr
;
}
...
...
@@ -594,7 +594,7 @@ btrestrpos(IndexScanDesc scan)
if
(
ItemPointerIsValid
(
&
(
scan
->
currentMarkData
)))
{
so
->
btso_curbuf
=
ReadBuffer
(
scan
->
relation
,
BufferGetBlockNumber
(
so
->
btso_mrkbuf
));
BufferGetBlockNumber
(
so
->
btso_mrkbuf
));
scan
->
currentItemData
=
scan
->
currentMarkData
;
so
->
curHeapIptr
=
so
->
mrkHeapIptr
;
...
...
@@ -628,6 +628,7 @@ _bt_restscan(IndexScanDesc scan)
BlockNumber
blkno
;
LockBuffer
(
buf
,
BT_READ
);
/*
* We use this as flag when first index tuple on page is deleted but
* we do not move left (this would slowdown vacuum) - so we set
...
...
src/backend/access/nbtree/nbtscan.c
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2
2 1999/05/25 18:20:30 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.2
3 1999/05/25 22:04:14 momjian
Exp $
*
*
* NOTES
...
...
@@ -133,9 +133,10 @@ _bt_scandel(IndexScanDesc scan, BlockNumber blkno, OffsetNumber offno)
ItemPointerSetInvalid
(
&
(
so
->
curHeapIptr
));
else
{
/*
* We have to lock buffer before _bt_step
* and unlock it after that.
/*
* We have to lock buffer before _bt_step and unlock it after
* that.
*/
LockBuffer
(
buf
,
BT_READ
);
_bt_step
(
scan
,
&
buf
,
BackwardScanDirection
);
...
...
src/backend/optimizer/path/_deadcode/predmig.c
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/predmig.c,v 1.
2 1999/05/25 16:09:30
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/_deadcode/Attic/predmig.c,v 1.
3 1999/05/25 22:04:22
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -487,7 +487,7 @@ xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom)
}
/* -------------------
UTILITY FUNCTIONS
------------------------- */
/* -------------------
UTILITY FUNCTIONS
------------------------- */
/*
** xfunc_free_stream
...
...
src/backend/parser/analyze.c
View file @
4eadfe87
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: analyze.c,v 1.10
8 1999/05/25 16:10:10
momjian Exp $
* $Id: analyze.c,v 1.10
9 1999/05/25 22:04:25
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1187,7 +1187,7 @@ A_Expr_to_Expr(Node *ptr, bool *intersect_present)
break
;
}
default:
result
=
ptr
;
result
=
ptr
;
}
return
result
;
}
...
...
src/backend/storage/buffer/s_lock.c
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.
19 1999/05/25 16:11:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.
20 1999/05/25 22:04:32
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -100,7 +100,7 @@ s_lock(volatile slock_t *lock, const char *file, const int line)
#if defined(__m68k__)
static
void
tas_dummy
()
/*
really
means
:
extern
int
tas
(
slock_t
tas_dummy
()
/*
really
means
:
extern
int
tas
(
slock_t
*
**
lock
);
*/
{
__asm__
(
"
\n
\
...
...
src/backend/tioga/tgRecipe.h
View file @
4eadfe87
...
...
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: tgRecipe.h,v 1.
9 1999/05/25 16:11:4
6 momjian Exp $
* $Id: tgRecipe.h,v 1.
10 1999/05/25 22:04:3
6 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -36,6 +36,7 @@ typedef struct
*
*
*
*
* geo-decls.h */
#endif
/* TIOGA_FRONTEND */
...
...
src/backend/utils/adt/numeric.c
View file @
4eadfe87
...
...
@@ -5,7 +5,7 @@
*
* 1998 Jan Wieck
*
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.1
4 1999/05/25 16:12:14
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.1
5 1999/05/25 22:04:40
momjian Exp $
*
* ----------
*/
...
...
@@ -2506,10 +2506,10 @@ add_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
switch
(
cmp_abs
(
var1
,
var2
))
{
case
0
:
/* ----------
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
digitbuf_free
(
result
->
buf
);
result
->
buf
=
digitbuf_alloc
(
0
);
result
->
ndigits
=
0
;
...
...
@@ -2522,10 +2522,10 @@ add_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
break
;
case
1
:
/* ----------
* ABS(var1) > ABS(var2)
* result = +(ABS(var1) - ABS(var2))
* ----------
*/
* ABS(var1) > ABS(var2)
* result = +(ABS(var1) - ABS(var2))
* ----------
*/
sub_abs
(
var1
,
var2
,
result
);
result
->
sign
=
NUMERIC_POS
;
break
;
...
...
@@ -2553,10 +2553,10 @@ add_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
switch
(
cmp_abs
(
var1
,
var2
))
{
case
0
:
/* ----------
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
digitbuf_free
(
result
->
buf
);
result
->
buf
=
digitbuf_alloc
(
0
);
result
->
ndigits
=
0
;
...
...
@@ -2569,10 +2569,10 @@ add_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
break
;
case
1
:
/* ----------
* ABS(var1) > ABS(var2)
* result = -(ABS(var1) - ABS(var2))
* ----------
*/
* ABS(var1) > ABS(var2)
* result = -(ABS(var1) - ABS(var2))
* ----------
*/
sub_abs
(
var1
,
var2
,
result
);
result
->
sign
=
NUMERIC_NEG
;
break
;
...
...
@@ -2637,10 +2637,10 @@ sub_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
switch
(
cmp_abs
(
var1
,
var2
))
{
case
0
:
/* ----------
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
digitbuf_free
(
result
->
buf
);
result
->
buf
=
digitbuf_alloc
(
0
);
result
->
ndigits
=
0
;
...
...
@@ -2653,10 +2653,10 @@ sub_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
break
;
case
1
:
/* ----------
* ABS(var1) > ABS(var2)
* result = +(ABS(var1) - ABS(var2))
* ----------
*/
* ABS(var1) > ABS(var2)
* result = +(ABS(var1) - ABS(var2))
* ----------
*/
sub_abs
(
var1
,
var2
,
result
);
result
->
sign
=
NUMERIC_POS
;
break
;
...
...
@@ -2684,10 +2684,10 @@ sub_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
switch
(
cmp_abs
(
var1
,
var2
))
{
case
0
:
/* ----------
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
* ABS(var1) == ABS(var2)
* result = ZERO
* ----------
*/
digitbuf_free
(
result
->
buf
);
result
->
buf
=
digitbuf_alloc
(
0
);
result
->
ndigits
=
0
;
...
...
@@ -2700,10 +2700,10 @@ sub_var(NumericVar * var1, NumericVar * var2, NumericVar * result)
break
;
case
1
:
/* ----------
* ABS(var1) > ABS(var2)
* result = -(ABS(var1) - ABS(var2))
* ----------
*/
* ABS(var1) > ABS(var2)
* result = -(ABS(var1) - ABS(var2))
* ----------
*/
sub_abs
(
var1
,
var2
,
result
);
result
->
sign
=
NUMERIC_NEG
;
break
;
...
...
src/backend/utils/adt/ruleutils.c
View file @
4eadfe87
...
...
@@ -3,7 +3,7 @@
* out of it's tuple
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.1
5 1999/05/25 16:12:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.1
6 1999/05/25 22:04:41
momjian Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
...
...
@@ -1394,7 +1394,7 @@ get_rule_expr(QryHier * qh, int rt_index, Node *node, bool varprefix)
break
;
case
T_SubLink
:
return
get_sublink_expr
(
qh
,
rt_index
,
node
,
varprefix
);
return
get_sublink_expr
(
qh
,
rt_index
,
node
,
varprefix
);
break
;
case
T_Const
:
...
...
src/backend/utils/mb/big5.c
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
* 1999/1/15 Tatsuo Ishii
*
* $Id: big5.c,v 1.
2 1999/05/25 16:12:40
momjian Exp $
* $Id: big5.c,v 1.
3 1999/05/25 22:04:45
momjian Exp $
*/
#include "mb/pg_wchar.h"
...
...
@@ -218,7 +218,7 @@ static unsigned short BinarySearchRange
{
if
(
0
==
array
[
mid
].
peer
)
return
0
;
if
(
code
>=
0xa140
U
)
if
(
code
>=
(
unsigned
)
0xa140
)
{
/* big5 to cns */
tmp
=
((
code
&
0xff00
)
-
(
array
[
mid
].
code
&
0xff00
))
>>
8
;
...
...
@@ -292,7 +292,7 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
unsigned
short
cns
=
0
;
int
i
;
if
(
big5
<
0xc940
U
)
if
(
big5
<
(
unsigned
)
0xc940
)
{
/* level 1 */
...
...
@@ -301,14 +301,14 @@ BIG5toCNS(unsigned short big5, unsigned char *lc)
if
(
b1c4
[
i
][
0
]
==
big5
)
{
*
lc
=
LC_CNS11643_4
;
return
(
b1c4
[
i
][
1
]
|
0x8080
U
);
return
(
b1c4
[
i
][
1
]
|
(
unsigned
)
0x8080
);
}
}
if
(
0
<
(
cns
=
BinarySearchRange
(
big5Level1ToCnsPlane1
,
23
,
big5
)))
*
lc
=
LC_CNS11643_1
;
}
else
if
(
big5
==
0xc94a
U
)
else
if
(
big5
==
(
unsigned
)
0xc94a
)
{
/* level 2 */
*
lc
=
LC_CNS11643_1
;
...
...
src/backend/utils/mb/conv.c
View file @
4eadfe87
...
...
@@ -2,7 +2,7 @@
* conversion between client encoding and server internal encoding
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
* $Id: conv.c,v 1.
8 1999/05/25 16:12:41
momjian Exp $
* $Id: conv.c,v 1.
9 1999/05/25 22:04:47
momjian Exp $
*/
#include <stdio.h>
#include <string.h>
...
...
@@ -384,7 +384,7 @@ big52mic(unsigned char *big5, unsigned char *p, int len)
while
(
len
>
0
&&
(
c1
=
*
big5
++
))
{
if
(
c1
<=
0x007f
U
)
if
(
c1
<=
(
unsigned
)
0x7f
)
{
/* ASCII */
len
--
;
*
p
++
=
c1
;
...
...
src/include/access/nbtree.h
View file @
4eadfe87
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nbtree.h,v 1.2
6 1999/05/25 18:31:28 vadim
Exp $
* $Id: nbtree.h,v 1.2
7 1999/05/25 22:04:55 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -19,7 +19,8 @@
#include <storage/page.h>
#include <access/funcindex.h>
#include <access/itup.h>
#include <storage/bufmgr.h>
/* don't remove, required by BT_READ/BT_WRITE */
#include <storage/bufmgr.h>
/* don't remove, required by
* BT_READ/BT_WRITE */
#include <storage/itemptr.h>
/*
...
...
src/include/access/strat.h
View file @
4eadfe87
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: strat.h,v 1.1
3 1999/05/25 16:13:35
momjian Exp $
* $Id: strat.h,v 1.1
4 1999/05/25 22:04:56
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -32,6 +32,7 @@ typedef struct StrategyTransformMapData
*
*
*
*
* STRUCTURE */
typedef
StrategyTransformMapData
*
StrategyTransformMap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment