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
ea5b5357
Commit
ea5b5357
authored
Aug 12, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more (void) and fix -Wall warnings.
parent
0f6a961e
Changes
79
Hide whitespace changes
Inline
Side-by-side
Showing
79 changed files
with
316 additions
and
323 deletions
+316
-323
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+10
-10
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashinsert.c
+2
-2
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashovfl.c
+5
-5
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashpage.c
+2
-2
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+2
-2
src/backend/access/heap/stats.c
src/backend/access/heap/stats.c
+2
-2
src/backend/access/index/indexam.c
src/backend/access/index/indexam.c
+7
-7
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsearch.c
+5
-5
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtsort.c
+10
-10
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtree.c
+8
-8
src/backend/access/transam/transsup.c
src/backend/access/transam/transsup.c
+2
-2
src/backend/access/transam/varsup.c
src/backend/access/transam/varsup.c
+2
-2
src/backend/access/transam/xact.c
src/backend/access/transam/xact.c
+4
-4
src/backend/access/transam/xid.c
src/backend/access/transam/xid.c
+2
-2
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+2
-2
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+3
-3
src/backend/catalog/index.c
src/backend/catalog/index.c
+6
-6
src/backend/catalog/pg_operator.c
src/backend/catalog/pg_operator.c
+5
-5
src/backend/catalog/pg_type.c
src/backend/catalog/pg_type.c
+2
-2
src/backend/commands/async.c
src/backend/commands/async.c
+3
-3
src/backend/commands/command.c
src/backend/commands/command.c
+4
-4
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+3
-3
src/backend/commands/define.c
src/backend/commands/define.c
+3
-3
src/backend/commands/purge.c
src/backend/commands/purge.c
+2
-2
src/backend/commands/rename.c
src/backend/commands/rename.c
+3
-3
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+5
-5
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+2
-2
src/backend/executor/functions.c
src/backend/executor/functions.c
+2
-2
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeMergejoin.c
+2
-1
src/backend/lib/hasht.c
src/backend/lib/hasht.c
+2
-2
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+21
-21
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-fsstubs.c
+6
-6
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+2
-2
src/backend/libpq/portal.c
src/backend/libpq/portal.c
+3
-3
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+19
-19
src/backend/libpq/pqpacket.c
src/backend/libpq/pqpacket.c
+2
-2
src/backend/nodes/read.c
src/backend/nodes/read.c
+2
-2
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_eval.c
+1
-8
src/backend/optimizer/geqo/geqo_params.c
src/backend/optimizer/geqo/geqo_params.c
+2
-2
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/indxpath.c
+2
-2
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+2
-2
src/backend/port/BSD44_derived/dl.c
src/backend/port/BSD44_derived/dl.c
+5
-5
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+9
-9
src/backend/regex/regcomp.c
src/backend/regex/regcomp.c
+5
-5
src/backend/regex/regerror.c
src/backend/regex/regerror.c
+3
-3
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteHandler.c
+3
-3
src/backend/rewrite/rewriteSupport.c
src/backend/rewrite/rewriteSupport.c
+2
-2
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+4
-4
src/backend/storage/file/fd.c
src/backend/storage/file/fd.c
+3
-3
src/backend/storage/ipc/s_lock.c
src/backend/storage/ipc/s_lock.c
+5
-5
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/shmem.c
+3
-3
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinval.c
+2
-2
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/ipc/sinvaladt.c
+3
-3
src/backend/storage/large_object/inv_api.c
src/backend/storage/large_object/inv_api.c
+5
-5
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+5
-5
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/multi.c
+2
-2
src/backend/storage/smgr/md.c
src/backend/storage/smgr/md.c
+7
-7
src/backend/tcop/aclchk.c
src/backend/tcop/aclchk.c
+2
-2
src/backend/tcop/dest.c
src/backend/tcop/dest.c
+2
-2
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayfuncs.c
+7
-7
src/backend/utils/adt/date.c
src/backend/utils/adt/date.c
+3
-3
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/geo_ops.c
+3
-3
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+3
-3
src/backend/utils/adt/numutils.c
src/backend/utils/adt/numutils.c
+3
-3
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regexp.c
+2
-2
src/backend/utils/adt/sets.c
src/backend/utils/adt/sets.c
+2
-2
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+4
-4
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+2
-2
src/backend/utils/error/exc.c
src/backend/utils/error/exc.c
+12
-12
src/backend/utils/error/format.c
src/backend/utils/error/format.c
+2
-2
src/backend/utils/hash/dynahash.c
src/backend/utils/hash/dynahash.c
+5
-5
src/backend/utils/init/postinit.c
src/backend/utils/init/postinit.c
+3
-3
src/backend/utils/mmgr/portalmem.c
src/backend/utils/mmgr/portalmem.c
+2
-2
src/backend/utils/sort/lselect.c
src/backend/utils/sort/lselect.c
+1
-3
src/backend/utils/sort/psort.c
src/backend/utils/sort/psort.c
+5
-4
src/lextest/lextest.c
src/lextest/lextest.c
+1
-1
src/test/examples/testlo.c
src/test/examples/testlo.c
+5
-5
src/test/examples/testlo2.c
src/test/examples/testlo2.c
+5
-5
src/test/regress/regress.c
src/test/regress/regress.c
+2
-2
No files found.
src/backend/access/gist/gist.c
View file @
ea5b5357
...
@@ -706,7 +706,7 @@ gistSplit(Relation r,
...
@@ -706,7 +706,7 @@ gistSplit(Relation r,
item
=
(
IndexTuple
)
PageGetItem
(
p
,
itemid
);
item
=
(
IndexTuple
)
PageGetItem
(
p
,
itemid
);
if
(
i
==
*
(
v
.
spl_left
))
{
if
(
i
==
*
(
v
.
spl_left
))
{
(
void
)
gistPageAddItem
(
giststate
,
r
,
left
,
(
Item
)
item
,
gistPageAddItem
(
giststate
,
r
,
left
,
(
Item
)
item
,
IndexTupleSize
(
item
),
IndexTupleSize
(
item
),
leftoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
leftoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
leftoff
=
OffsetNumberNext
(
leftoff
);
leftoff
=
OffsetNumberNext
(
leftoff
);
...
@@ -718,7 +718,7 @@ gistSplit(Relation r,
...
@@ -718,7 +718,7 @@ gistSplit(Relation r,
pfree
(
newtup
);
pfree
(
newtup
);
}
}
else
{
else
{
(
void
)
gistPageAddItem
(
giststate
,
r
,
right
,
(
Item
)
item
,
gistPageAddItem
(
giststate
,
r
,
right
,
(
Item
)
item
,
IndexTupleSize
(
item
),
IndexTupleSize
(
item
),
rightoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
rightoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
rightoff
=
OffsetNumberNext
(
rightoff
);
rightoff
=
OffsetNumberNext
(
rightoff
);
...
@@ -736,7 +736,7 @@ gistSplit(Relation r,
...
@@ -736,7 +736,7 @@ gistSplit(Relation r,
/* now insert the new index tuple */
/* now insert the new index tuple */
if
(
*
(
v
.
spl_left
)
!=
FirstOffsetNumber
)
{
if
(
*
(
v
.
spl_left
)
!=
FirstOffsetNumber
)
{
(
void
)
gistPageAddItem
(
giststate
,
r
,
left
,
(
Item
)
itup
,
gistPageAddItem
(
giststate
,
r
,
left
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
IndexTupleSize
(
itup
),
leftoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
leftoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
leftoff
=
OffsetNumberNext
(
leftoff
);
leftoff
=
OffsetNumberNext
(
leftoff
);
...
@@ -747,7 +747,7 @@ gistSplit(Relation r,
...
@@ -747,7 +747,7 @@ gistSplit(Relation r,
if
(
itup
!=
newtup
)
if
(
itup
!=
newtup
)
pfree
(
newtup
);
pfree
(
newtup
);
}
else
{
}
else
{
(
void
)
gistPageAddItem
(
giststate
,
r
,
right
,
(
Item
)
itup
,
gistPageAddItem
(
giststate
,
r
,
right
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
IndexTupleSize
(
itup
),
rightoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
rightoff
,
LP_USED
,
&
tmpdentry
,
&
newtup
);
rightoff
=
OffsetNumberNext
(
rightoff
);
rightoff
=
OffsetNumberNext
(
rightoff
);
...
@@ -852,7 +852,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
...
@@ -852,7 +852,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
pfree
(
res
);
pfree
(
res
);
gistdoinsert
(
r
,
rtup
,
giststate
);
gistdoinsert
(
r
,
rtup
,
giststate
);
}
else
{
}
else
{
(
void
)
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
ltup
,
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
ltup
,
IndexTupleSize
(
ltup
),
InvalidOffsetNumber
,
IndexTupleSize
(
ltup
),
InvalidOffsetNumber
,
LP_USED
,
&
tmpentry
,
&
newtup
);
LP_USED
,
&
tmpentry
,
&
newtup
);
WriteBuffer
(
b
);
WriteBuffer
(
b
);
...
@@ -863,7 +863,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
...
@@ -863,7 +863,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
pfree
(
tmpentry
.
pred
);
pfree
(
tmpentry
.
pred
);
if
(
ltup
!=
newtup
)
if
(
ltup
!=
newtup
)
pfree
(
newtup
);
pfree
(
newtup
);
(
void
)
gistentryinsert
(
r
,
stk
,
rtup
,
giststate
);
gistentryinsert
(
r
,
stk
,
rtup
,
giststate
);
}
}
}
}
...
@@ -919,7 +919,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
...
@@ -919,7 +919,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
b
=
ReadBuffer
(
r
,
GISTP_ROOT
);
b
=
ReadBuffer
(
r
,
GISTP_ROOT
);
GISTInitBuffer
(
b
,
0
);
GISTInitBuffer
(
b
,
0
);
p
=
BufferGetPage
(
b
);
p
=
BufferGetPage
(
b
);
(
void
)
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
lt
,
IndexTupleSize
(
lt
),
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
lt
,
IndexTupleSize
(
lt
),
FirstOffsetNumber
,
FirstOffsetNumber
,
LP_USED
,
&
tmpentry
,
&
newtup
);
LP_USED
,
&
tmpentry
,
&
newtup
);
/* be tidy */
/* be tidy */
...
@@ -927,7 +927,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
...
@@ -927,7 +927,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt)
pfree
(
tmpentry
.
pred
);
pfree
(
tmpentry
.
pred
);
if
(
lt
!=
newtup
)
if
(
lt
!=
newtup
)
pfree
(
newtup
);
pfree
(
newtup
);
(
void
)
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
rt
,
IndexTupleSize
(
rt
),
gistPageAddItem
(
giststate
,
r
,
p
,
(
Item
)
rt
,
IndexTupleSize
(
rt
),
OffsetNumberNext
(
FirstOffsetNumber
),
LP_USED
,
OffsetNumberNext
(
FirstOffsetNumber
),
LP_USED
,
&
tmpentry
,
&
newtup
);
&
tmpentry
,
&
newtup
);
/* be tidy */
/* be tidy */
...
@@ -1261,7 +1261,7 @@ char *text_range_out(TXTRANGE *r)
...
@@ -1261,7 +1261,7 @@ char *text_range_out(TXTRANGE *r)
memcpy
(
upper
,
VARDATA
(
TRUPPER
(
r
)),
VARSIZE
(
TRUPPER
(
r
))
-
VARHDRSZ
);
memcpy
(
upper
,
VARDATA
(
TRUPPER
(
r
)),
VARSIZE
(
TRUPPER
(
r
))
-
VARHDRSZ
);
upper
[
VARSIZE
(
TRUPPER
(
r
))
-
VARHDRSZ
]
=
'\0'
;
upper
[
VARSIZE
(
TRUPPER
(
r
))
-
VARHDRSZ
]
=
'\0'
;
(
void
)
sprintf
(
result
,
"[%s,%s): %d"
,
lower
,
upper
,
r
->
flag
);
sprintf
(
result
,
"[%s,%s): %d"
,
lower
,
upper
,
r
->
flag
);
pfree
(
lower
);
pfree
(
lower
);
pfree
(
upper
);
pfree
(
upper
);
return
(
result
);
return
(
result
);
...
@@ -1275,7 +1275,7 @@ int_range_out(INTRANGE *r)
...
@@ -1275,7 +1275,7 @@ int_range_out(INTRANGE *r)
if
(
r
==
NULL
)
if
(
r
==
NULL
)
return
(
NULL
);
return
(
NULL
);
result
=
(
char
*
)
palloc
(
80
);
result
=
(
char
*
)
palloc
(
80
);
(
void
)
sprintf
(
result
,
"[%d,%d): %d"
,
r
->
lower
,
r
->
upper
,
r
->
flag
);
sprintf
(
result
,
"[%d,%d): %d"
,
r
->
lower
,
r
->
upper
,
r
->
flag
);
return
(
result
);
return
(
result
);
}
}
...
...
src/backend/access/hash/hashinsert.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.
7 1996/11/05 09:40:18 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.
8 1997/08/12 22:51:30 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -223,7 +223,7 @@ _hash_pgaddtup(Relation rel,
...
@@ -223,7 +223,7 @@ _hash_pgaddtup(Relation rel,
_hash_checkpage
(
page
,
LH_BUCKET_PAGE
|
LH_OVERFLOW_PAGE
);
_hash_checkpage
(
page
,
LH_BUCKET_PAGE
|
LH_OVERFLOW_PAGE
);
itup_off
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
page
));
itup_off
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
page
));
(
void
)
PageAddItem
(
page
,
(
Item
)
hitem
,
itemsize
,
itup_off
,
LP_USED
);
PageAddItem
(
page
,
(
Item
)
hitem
,
itemsize
,
itup_off
,
LP_USED
);
/* write the buffer, but hold our lock */
/* write the buffer, but hold our lock */
_hash_wrtnorelbuf
(
rel
,
buf
);
_hash_wrtnorelbuf
(
rel
,
buf
);
...
...
src/backend/access/hash/hashovfl.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.
8 1996/11/05 09:40:20 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.
9 1997/08/12 22:51:34 momjian
Exp $
*
*
* NOTES
* NOTES
* Overflow pages look like ordinary relation pages.
* Overflow pages look like ordinary relation pages.
...
@@ -315,7 +315,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
...
@@ -315,7 +315,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
nextblkno
=
ovflopaque
->
hasho_nextblkno
;
nextblkno
=
ovflopaque
->
hasho_nextblkno
;
prevblkno
=
ovflopaque
->
hasho_prevblkno
;
prevblkno
=
ovflopaque
->
hasho_prevblkno
;
bucket
=
ovflopaque
->
hasho_bucket
;
bucket
=
ovflopaque
->
hasho_bucket
;
(
void
)
memset
(
ovflpage
,
0
,
BufferGetPageSize
(
ovflbuf
));
memset
(
ovflpage
,
0
,
BufferGetPageSize
(
ovflbuf
));
_hash_wrtbuf
(
rel
,
ovflbuf
);
_hash_wrtbuf
(
rel
,
ovflbuf
);
/*
/*
...
@@ -436,8 +436,8 @@ _hash_initbitmap(Relation rel,
...
@@ -436,8 +436,8 @@ _hash_initbitmap(Relation rel,
/* set all of the bits above 'nbits' to 1 */
/* set all of the bits above 'nbits' to 1 */
clearints
=
((
nbits
-
1
)
>>
INT_TO_BIT
)
+
1
;
clearints
=
((
nbits
-
1
)
>>
INT_TO_BIT
)
+
1
;
clearbytes
=
clearints
<<
INT_TO_BYTE
;
clearbytes
=
clearints
<<
INT_TO_BYTE
;
(
void
)
memset
((
char
*
)
freep
,
0
,
clearbytes
);
memset
((
char
*
)
freep
,
0
,
clearbytes
);
(
void
)
memset
(((
char
*
)
freep
)
+
clearbytes
,
0xFF
,
memset
(((
char
*
)
freep
)
+
clearbytes
,
0xFF
,
BMPGSZ_BYTE
(
metap
)
-
clearbytes
);
BMPGSZ_BYTE
(
metap
)
-
clearbytes
);
freep
[
clearints
-
1
]
=
ALL_SET
<<
(
nbits
&
INT_MASK
);
freep
[
clearints
-
1
]
=
ALL_SET
<<
(
nbits
&
INT_MASK
);
...
@@ -566,7 +566,7 @@ _hash_squeezebucket(Relation rel,
...
@@ -566,7 +566,7 @@ _hash_squeezebucket(Relation rel,
* page.
* page.
*/
*/
woffnum
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
wpage
));
woffnum
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
wpage
));
(
void
)
PageAddItem
(
wpage
,
(
Item
)
hitem
,
itemsz
,
woffnum
,
LP_USED
);
PageAddItem
(
wpage
,
(
Item
)
hitem
,
itemsz
,
woffnum
,
LP_USED
);
/*
/*
* delete the tuple from the "read" page.
* delete the tuple from the "read" page.
...
...
src/backend/access/hash/hashpage.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.
7 1996/11/05 09:40:21 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.
8 1997/08/12 22:51:37 momjian
Exp $
*
*
* NOTES
* NOTES
* Postgres hash pages look like ordinary relation pages. The opaque
* Postgres hash pages look like ordinary relation pages. The opaque
...
@@ -609,7 +609,7 @@ _hash_splitpage(Relation rel,
...
@@ -609,7 +609,7 @@ _hash_splitpage(Relation rel,
}
}
noffnum
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
npage
));
noffnum
=
OffsetNumberNext
(
PageGetMaxOffsetNumber
(
npage
));
(
void
)
PageAddItem
(
npage
,
(
Item
)
hitem
,
itemsz
,
noffnum
,
LP_USED
);
PageAddItem
(
npage
,
(
Item
)
hitem
,
itemsz
,
noffnum
,
LP_USED
);
_hash_wrtnorelbuf
(
rel
,
nbuf
);
_hash_wrtnorelbuf
(
rel
,
nbuf
);
/*
/*
...
...
src/backend/access/heap/heapam.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.1
2 1997/08/06 02:08:39 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.1
3 1997/08/12 22:51:40 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -548,7 +548,7 @@ heap_close(Relation relation)
...
@@ -548,7 +548,7 @@ heap_close(Relation relation)
IncrHeapAccessStat
(
local_close
);
IncrHeapAccessStat
(
local_close
);
IncrHeapAccessStat
(
global_close
);
IncrHeapAccessStat
(
global_close
);
(
void
)
RelationClose
(
relation
);
RelationClose
(
relation
);
}
}
...
...
src/backend/access/heap/stats.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.
9 1996/11/10 02:58:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.
10 1997/08/12 22:51:44
momjian Exp $
*
*
* NOTES
* NOTES
* initam should be moved someplace else.
* initam should be moved someplace else.
...
@@ -116,7 +116,7 @@ InitHeapAccessStatistics()
...
@@ -116,7 +116,7 @@ InitHeapAccessStatistics()
* return to old memory context
* return to old memory context
* ----------------
* ----------------
*/
*/
(
void
)
MemoryContextSwitchTo
(
oldContext
);
MemoryContextSwitchTo
(
oldContext
);
heap_access_stats
=
stats
;
heap_access_stats
=
stats
;
}
}
...
...
src/backend/access/index/indexam.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.1
0 1997/01/10 09:46:25 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.1
1 1997/08/12 22:51:48 momjian
Exp $
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
* index_open - open an index relation by relationId
...
@@ -153,7 +153,7 @@ index_openr(char *relationName)
...
@@ -153,7 +153,7 @@ index_openr(char *relationName)
void
void
index_close
(
Relation
relation
)
index_close
(
Relation
relation
)
{
{
(
void
)
RelationClose
(
relation
);
RelationClose
(
relation
);
}
}
/* ----------------
/* ----------------
...
@@ -212,7 +212,7 @@ index_delete(Relation relation, ItemPointer indexItem)
...
@@ -212,7 +212,7 @@ index_delete(Relation relation, ItemPointer indexItem)
RELATION_CHECKS
;
RELATION_CHECKS
;
GET_REL_PROCEDURE
(
delete
,
amdelete
);
GET_REL_PROCEDURE
(
delete
,
amdelete
);
(
void
)
fmgr
(
procedure
,
relation
,
indexItem
);
fmgr
(
procedure
,
relation
,
indexItem
);
}
}
/* ----------------
/* ----------------
...
@@ -251,7 +251,7 @@ index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key)
...
@@ -251,7 +251,7 @@ index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key)
SCAN_CHECKS
;
SCAN_CHECKS
;
GET_SCAN_PROCEDURE
(
rescan
,
amrescan
);
GET_SCAN_PROCEDURE
(
rescan
,
amrescan
);
(
void
)
fmgr
(
procedure
,
scan
,
scanFromEnd
,
key
);
fmgr
(
procedure
,
scan
,
scanFromEnd
,
key
);
}
}
/* ----------------
/* ----------------
...
@@ -266,7 +266,7 @@ index_endscan(IndexScanDesc scan)
...
@@ -266,7 +266,7 @@ index_endscan(IndexScanDesc scan)
SCAN_CHECKS
;
SCAN_CHECKS
;
GET_SCAN_PROCEDURE
(
endscan
,
amendscan
);
GET_SCAN_PROCEDURE
(
endscan
,
amendscan
);
(
void
)
fmgr
(
procedure
,
scan
);
fmgr
(
procedure
,
scan
);
RelationUnsetRIntentLock
(
scan
->
relation
);
RelationUnsetRIntentLock
(
scan
->
relation
);
}
}
...
@@ -283,7 +283,7 @@ index_markpos(IndexScanDesc scan)
...
@@ -283,7 +283,7 @@ index_markpos(IndexScanDesc scan)
SCAN_CHECKS
;
SCAN_CHECKS
;
GET_SCAN_PROCEDURE
(
markpos
,
ammarkpos
);
GET_SCAN_PROCEDURE
(
markpos
,
ammarkpos
);
(
void
)
fmgr
(
procedure
,
scan
);
fmgr
(
procedure
,
scan
);
}
}
/* ----------------
/* ----------------
...
@@ -298,7 +298,7 @@ index_restrpos(IndexScanDesc scan)
...
@@ -298,7 +298,7 @@ index_restrpos(IndexScanDesc scan)
SCAN_CHECKS
;
SCAN_CHECKS
;
GET_SCAN_PROCEDURE
(
restrpos
,
amrestrpos
);
GET_SCAN_PROCEDURE
(
restrpos
,
amrestrpos
);
(
void
)
fmgr
(
procedure
,
scan
);
fmgr
(
procedure
,
scan
);
}
}
/* ----------------
/* ----------------
...
...
src/backend/access/nbtree/nbtsearch.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.2
1 1997/06/10 07:28:50 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.2
2 1997/08/12 22:51:50 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -915,7 +915,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -915,7 +915,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
/* if this is true, the key we just looked at is gone */
/* if this is true, the key we just looked at is gone */
if
(
result
>
0
)
if
(
result
>
0
)
(
void
)
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
}
}
break
;
break
;
...
@@ -931,7 +931,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -931,7 +931,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
}
while
(
result
>=
0
);
}
while
(
result
>=
0
);
if
(
result
<
0
)
if
(
result
<
0
)
(
void
)
_bt_twostep
(
scan
,
&
buf
,
BackwardScanDirection
);
_bt_twostep
(
scan
,
&
buf
,
BackwardScanDirection
);
}
}
break
;
break
;
...
@@ -966,7 +966,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -966,7 +966,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
* No key on this page, but offnum from _bt_binsrch() greater
* No key on this page, but offnum from _bt_binsrch() greater
* maxoff - have to move right. - vadim 12/06/96
* maxoff - have to move right. - vadim 12/06/96
*/
*/
(
void
)
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
}
}
}
}
else
if
(
result
<
0
)
else
if
(
result
<
0
)
...
@@ -981,7 +981,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
...
@@ -981,7 +981,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
}
while
(
result
<
0
);
}
while
(
result
<
0
);
if
(
result
>
0
)
if
(
result
>
0
)
(
void
)
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
_bt_twostep
(
scan
,
&
buf
,
ForwardScanDirection
);
}
}
break
;
break
;
...
...
src/backend/access/nbtree/nbtsort.c
View file @
ea5b5357
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: nbtsort.c,v 1.1
7 1997/06/06 03:11:46 vadim
Exp $
* $Id: nbtsort.c,v 1.1
8 1997/08/12 22:51:52 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -364,7 +364,7 @@ _bt_tapereset(BTTapeBlock *tape)
...
@@ -364,7 +364,7 @@ _bt_tapereset(BTTapeBlock *tape)
static
void
static
void
_bt_taperewind
(
BTTapeBlock
*
tape
)
_bt_taperewind
(
BTTapeBlock
*
tape
)
{
{
(
void
)
FileSeek
(
tape
->
bttb_fd
,
0
,
SEEK_SET
);
FileSeek
(
tape
->
bttb_fd
,
0
,
SEEK_SET
);
}
}
/*
/*
...
@@ -511,7 +511,7 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
...
@@ -511,7 +511,7 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
static
void
static
void
_bt_tapeadd
(
BTTapeBlock
*
tape
,
BTItem
item
,
int
itemsz
)
_bt_tapeadd
(
BTTapeBlock
*
tape
,
BTItem
item
,
int
itemsz
)
{
{
(
void
)
memcpy
(
tape
->
bttb_data
+
tape
->
bttb_top
,
item
,
itemsz
);
memcpy
(
tape
->
bttb_data
+
tape
->
bttb_top
,
item
,
itemsz
);
++
tape
->
bttb_ntup
;
++
tape
->
bttb_ntup
;
tape
->
bttb_top
+=
DOUBLEALIGN
(
itemsz
);
tape
->
bttb_top
+=
DOUBLEALIGN
(
itemsz
);
}
}
...
@@ -535,7 +535,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
...
@@ -535,7 +535,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if
(
btspool
==
(
BTSpool
*
)
NULL
||
fname
==
(
char
*
)
NULL
)
{
if
(
btspool
==
(
BTSpool
*
)
NULL
||
fname
==
(
char
*
)
NULL
)
{
elog
(
WARN
,
"_bt_spoolinit: out of memory"
);
elog
(
WARN
,
"_bt_spoolinit: out of memory"
);
}
}
(
void
)
memset
((
char
*
)
btspool
,
0
,
sizeof
(
BTSpool
));
memset
((
char
*
)
btspool
,
0
,
sizeof
(
BTSpool
));
btspool
->
bts_ntapes
=
ntapes
;
btspool
->
bts_ntapes
=
ntapes
;
btspool
->
bts_tape
=
0
;
btspool
->
bts_tape
=
0
;
btspool
->
isunique
=
isunique
;
btspool
->
isunique
=
isunique
;
...
@@ -811,7 +811,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
...
@@ -811,7 +811,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
{
{
BTPageState
*
state
=
(
BTPageState
*
)
palloc
(
sizeof
(
BTPageState
));
BTPageState
*
state
=
(
BTPageState
*
)
palloc
(
sizeof
(
BTPageState
));
(
void
)
memset
((
char
*
)
state
,
0
,
sizeof
(
BTPageState
));
memset
((
char
*
)
state
,
0
,
sizeof
(
BTPageState
));
_bt_blnewpage
(
index
,
&
(
state
->
btps_buf
),
&
(
state
->
btps_page
),
flags
);
_bt_blnewpage
(
index
,
&
(
state
->
btps_buf
),
&
(
state
->
btps_page
),
flags
);
state
->
btps_firstoff
=
InvalidOffsetNumber
;
state
->
btps_firstoff
=
InvalidOffsetNumber
;
state
->
btps_lastoff
=
P_HIKEY
;
state
->
btps_lastoff
=
P_HIKEY
;
...
@@ -1005,7 +1005,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
...
@@ -1005,7 +1005,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
_bt_pagestate
(
index
,
0
,
state
->
btps_level
+
1
,
true
);
_bt_pagestate
(
index
,
0
,
state
->
btps_level
+
1
,
true
);
}
}
nbti
=
_bt_minitem
(
opage
,
BufferGetBlockNumber
(
obuf
),
0
);
nbti
=
_bt_minitem
(
opage
,
BufferGetBlockNumber
(
obuf
),
0
);
(
void
)
_bt_buildadd
(
index
,
state
->
btps_next
,
nbti
,
0
);
_bt_buildadd
(
index
,
state
->
btps_next
,
nbti
,
0
);
pfree
((
void
*
)
nbti
);
pfree
((
void
*
)
nbti
);
}
}
...
@@ -1081,7 +1081,7 @@ _bt_uppershutdown(Relation index, BTPageState *state)
...
@@ -1081,7 +1081,7 @@ _bt_uppershutdown(Relation index, BTPageState *state)
_bt_metaproot
(
index
,
blkno
,
s
->
btps_level
+
1
);
_bt_metaproot
(
index
,
blkno
,
s
->
btps_level
+
1
);
}
else
{
}
else
{
bti
=
_bt_minitem
(
s
->
btps_page
,
blkno
,
0
);
bti
=
_bt_minitem
(
s
->
btps_page
,
blkno
,
0
);
(
void
)
_bt_buildadd
(
index
,
s
->
btps_next
,
bti
,
0
);
_bt_buildadd
(
index
,
s
->
btps_next
,
bti
,
0
);
pfree
((
void
*
)
bti
);
pfree
((
void
*
)
bti
);
}
}
}
}
...
@@ -1158,7 +1158,7 @@ _bt_merge(Relation index, BTSpool *btspool)
...
@@ -1158,7 +1158,7 @@ _bt_merge(Relation index, BTSpool *btspool)
* _bt_taperead will return 0 only if the tape is actually
* _bt_taperead will return 0 only if the tape is actually
* at EOF.
* at EOF.
*/
*/
(
void
)
memset
((
char
*
)
&
q
,
0
,
sizeof
(
BTPriQueue
));
memset
((
char
*
)
&
q
,
0
,
sizeof
(
BTPriQueue
));
goodtapes
=
0
;
goodtapes
=
0
;
for
(
t
=
0
;
t
<
btspool
->
bts_ntapes
;
++
t
)
{
for
(
t
=
0
;
t
<
btspool
->
bts_ntapes
;
++
t
)
{
itape
=
btspool
->
bts_itape
[
t
];
itape
=
btspool
->
bts_itape
[
t
];
...
@@ -1207,7 +1207,7 @@ _bt_merge(Relation index, BTSpool *btspool)
...
@@ -1207,7 +1207,7 @@ _bt_merge(Relation index, BTSpool *btspool)
btisz
=
BTITEMSZ
(
bti
);
btisz
=
BTITEMSZ
(
bti
);
btisz
=
DOUBLEALIGN
(
btisz
);
btisz
=
DOUBLEALIGN
(
btisz
);
if
(
doleaf
)
{
if
(
doleaf
)
{
(
void
)
_bt_buildadd
(
index
,
state
,
bti
,
BTP_LEAF
);
_bt_buildadd
(
index
,
state
,
bti
,
BTP_LEAF
);
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
{
{
bool
isnull
;
bool
isnull
;
...
@@ -1361,7 +1361,7 @@ _bt_upperbuild(Relation index)
...
@@ -1361,7 +1361,7 @@ _bt_upperbuild(Relation index)
d
,
state
->
btps_level
);
d
,
state
->
btps_level
);
}
}
#endif
/* FASTBUILD_DEBUG && FASTBUILD_MERGE */
#endif
/* FASTBUILD_DEBUG && FASTBUILD_MERGE */
(
void
)
_bt_buildadd
(
index
,
state
,
nbti
,
0
);
_bt_buildadd
(
index
,
state
,
nbti
,
0
);
pfree
((
void
*
)
nbti
);
pfree
((
void
*
)
nbti
);
}
}
blk
=
ropaque
->
btpo_next
;
blk
=
ropaque
->
btpo_next
;
...
...
src/backend/access/rtree/rtree.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.1
2 1997/03/14 23:17:46 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.1
3 1997/08/12 22:51:54 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -501,12 +501,12 @@ dosplit(Relation r,
...
@@ -501,12 +501,12 @@ dosplit(Relation r,
item
=
(
IndexTuple
)
PageGetItem
(
p
,
itemid
);
item
=
(
IndexTuple
)
PageGetItem
(
p
,
itemid
);
if
(
i
==
*
(
v
.
spl_left
))
{
if
(
i
==
*
(
v
.
spl_left
))
{
(
void
)
PageAddItem
(
left
,
(
Item
)
item
,
IndexTupleSize
(
item
),
PageAddItem
(
left
,
(
Item
)
item
,
IndexTupleSize
(
item
),
leftoff
,
LP_USED
);
leftoff
,
LP_USED
);
leftoff
=
OffsetNumberNext
(
leftoff
);
leftoff
=
OffsetNumberNext
(
leftoff
);
v
.
spl_left
++
;
/* advance in left split vector */
v
.
spl_left
++
;
/* advance in left split vector */
}
else
{
}
else
{
(
void
)
PageAddItem
(
right
,
(
Item
)
item
,
IndexTupleSize
(
item
),
PageAddItem
(
right
,
(
Item
)
item
,
IndexTupleSize
(
item
),
rightoff
,
LP_USED
);
rightoff
,
LP_USED
);
rightoff
=
OffsetNumberNext
(
rightoff
);
rightoff
=
OffsetNumberNext
(
rightoff
);
v
.
spl_right
++
;
/* advance in right split vector */
v
.
spl_right
++
;
/* advance in right split vector */
...
@@ -518,12 +518,12 @@ dosplit(Relation r,
...
@@ -518,12 +518,12 @@ dosplit(Relation r,
/* now insert the new index tuple */
/* now insert the new index tuple */
if
(
*
(
v
.
spl_left
)
!=
FirstOffsetNumber
)
{
if
(
*
(
v
.
spl_left
)
!=
FirstOffsetNumber
)
{
(
void
)
PageAddItem
(
left
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
PageAddItem
(
left
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
leftoff
,
LP_USED
);
leftoff
,
LP_USED
);
leftoff
=
OffsetNumberNext
(
leftoff
);
leftoff
=
OffsetNumberNext
(
leftoff
);
ItemPointerSet
(
&
(
res
->
pointerData
),
lbknum
,
leftoff
);
ItemPointerSet
(
&
(
res
->
pointerData
),
lbknum
,
leftoff
);
}
else
{
}
else
{
(
void
)
PageAddItem
(
right
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
PageAddItem
(
right
,
(
Item
)
itup
,
IndexTupleSize
(
itup
),
rightoff
,
LP_USED
);
rightoff
,
LP_USED
);
rightoff
=
OffsetNumberNext
(
rightoff
);
rightoff
=
OffsetNumberNext
(
rightoff
);
ItemPointerSet
(
&
(
res
->
pointerData
),
rbknum
,
rightoff
);
ItemPointerSet
(
&
(
res
->
pointerData
),
rbknum
,
rightoff
);
...
@@ -617,7 +617,7 @@ rtintinsert(Relation r,
...
@@ -617,7 +617,7 @@ rtintinsert(Relation r,
WriteBuffer
(
b
);
/* don't forget to release buffer! - 01/31/94 */
WriteBuffer
(
b
);
/* don't forget to release buffer! - 01/31/94 */
pfree
(
res
);
pfree
(
res
);
}
else
{
}
else
{
(
void
)
PageAddItem
(
p
,
(
Item
)
rtup
,
IndexTupleSize
(
rtup
),
PageAddItem
(
p
,
(
Item
)
rtup
,
IndexTupleSize
(
rtup
),
PageGetMaxOffsetNumber
(
p
),
LP_USED
);
PageGetMaxOffsetNumber
(
p
),
LP_USED
);
WriteBuffer
(
b
);
WriteBuffer
(
b
);
ldatum
=
(((
char
*
)
ltup
)
+
sizeof
(
IndexTupleData
));
ldatum
=
(((
char
*
)
ltup
)
+
sizeof
(
IndexTupleData
));
...
@@ -640,9 +640,9 @@ rtnewroot(Relation r, IndexTuple lt, IndexTuple rt)
...
@@ -640,9 +640,9 @@ rtnewroot(Relation r, IndexTuple lt, IndexTuple rt)
b
=
ReadBuffer
(
r
,
P_ROOT
);
b
=
ReadBuffer
(
r
,
P_ROOT
);
RTInitBuffer
(
b
,
0
);
RTInitBuffer
(
b
,
0
);
p
=
BufferGetPage
(
b
);
p
=
BufferGetPage
(
b
);
(
void
)
PageAddItem
(
p
,
(
Item
)
lt
,
IndexTupleSize
(
lt
),
PageAddItem
(
p
,
(
Item
)
lt
,
IndexTupleSize
(
lt
),
FirstOffsetNumber
,
LP_USED
);
FirstOffsetNumber
,
LP_USED
);
(
void
)
PageAddItem
(
p
,
(
Item
)
rt
,
IndexTupleSize
(
rt
),
PageAddItem
(
p
,
(
Item
)
rt
,
IndexTupleSize
(
rt
),
OffsetNumberNext
(
FirstOffsetNumber
),
LP_USED
);
OffsetNumberNext
(
FirstOffsetNumber
),
LP_USED
);
WriteBuffer
(
b
);
WriteBuffer
(
b
);
}
}
...
...
src/backend/access/transam/transsup.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.
7 1996/12/14 05:20:39 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.
8 1997/08/12 22:51:57 momjian
Exp $
*
*
* NOTES
* NOTES
* This file contains support functions for the high
* This file contains support functions for the high
...
@@ -641,7 +641,7 @@ TransGetLastRecordedTransaction(Relation relation,
...
@@ -641,7 +641,7 @@ TransGetLastRecordedTransaction(Relation relation,
baseXid
=
blockNumber
*
TP_NumXidStatusPerBlock
;
baseXid
=
blockNumber
*
TP_NumXidStatusPerBlock
;
/* XXX ???? xid won't get returned! - AY '94 */
/* XXX ???? xid won't get returned! - AY '94 */
(
void
)
TransBlockGetLastTransactionIdStatus
(
block
,
baseXid
,
&
xid
);
TransBlockGetLastTransactionIdStatus
(
block
,
baseXid
,
&
xid
);
ReleaseBuffer
(
buffer
);
ReleaseBuffer
(
buffer
);
...
...
src/backend/access/transam/varsup.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.
7 1997/01/16 07:59:11 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.
8 1997/08/12 22:51:58 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -159,7 +159,7 @@ VariableRelationPutNextXid(TransactionId xid)
...
@@ -159,7 +159,7 @@ VariableRelationPutNextXid(TransactionId xid)
flushmode
=
SetBufferWriteMode
(
BUFFER_FLUSH_WRITE
);
flushmode
=
SetBufferWriteMode
(
BUFFER_FLUSH_WRITE
);
WriteBuffer
(
buf
);
WriteBuffer
(
buf
);
(
void
)
SetBufferWriteMode
(
flushmode
);
SetBufferWriteMode
(
flushmode
);
}
}
/* --------------------------------
/* --------------------------------
...
...
src/backend/access/transam/xact.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.1
0 1997/04/02 03:38:02 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.1
1 1997/08/12 22:52:01 momjian
Exp $
*
*
* NOTES
* NOTES
* Transaction aborts can now occur two ways:
* Transaction aborts can now occur two ways:
...
@@ -506,7 +506,7 @@ AtStart_Memory()
...
@@ -506,7 +506,7 @@ AtStart_Memory()
* tell system to allocate in the blank portal context
* tell system to allocate in the blank portal context
* ----------------
* ----------------
*/
*/
(
void
)
MemoryContextSwitchTo
(
portalContext
);
MemoryContextSwitchTo
(
portalContext
);
StartPortalAllocMode
(
DefaultAllocMode
,
0
);
StartPortalAllocMode
(
DefaultAllocMode
,
0
);
}
}
...
@@ -612,7 +612,7 @@ AtCommit_Memory()
...
@@ -612,7 +612,7 @@ AtCommit_Memory()
* ----------------
* ----------------
*/
*/
EndPortalAllocMode
();
EndPortalAllocMode
();
(
void
)
MemoryContextSwitchTo
(
TopMemoryContext
);
MemoryContextSwitchTo
(
TopMemoryContext
);
}
}
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
@@ -691,7 +691,7 @@ AtAbort_Memory()
...
@@ -691,7 +691,7 @@ AtAbort_Memory()
* portal memory context (until the next transaction).
* portal memory context (until the next transaction).
* ----------------
* ----------------
*/
*/
(
void
)
MemoryContextSwitchTo
(
TopMemoryContext
);
MemoryContextSwitchTo
(
TopMemoryContext
);
}
}
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
...
src/backend/access/transam/xid.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.
5 1996/11/10 02:59:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.
6 1997/08/12 22:52:02
momjian Exp $
*
*
* OLD COMMENTS
* OLD COMMENTS
* XXX WARNING
* XXX WARNING
...
@@ -59,7 +59,7 @@ xidout(TransactionId transactionId)
...
@@ -59,7 +59,7 @@ xidout(TransactionId transactionId)
/* maximum 32 bit unsigned integer representation takes 10 chars */
/* maximum 32 bit unsigned integer representation takes 10 chars */
representation
=
palloc
(
11
);
representation
=
palloc
(
11
);
(
void
)
sprintf
(
representation
,
"%u"
,
transactionId
);
sprintf
(
representation
,
"%u"
,
transactionId
);
return
(
representation
);
return
(
representation
);
...
...
src/backend/bootstrap/bootstrap.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.1
8 1997/06/25 21:12:19
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.1
9 1997/08/12 22:52:04
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1082,7 +1082,7 @@ index_register(char *heap,
...
@@ -1082,7 +1082,7 @@ index_register(char *heap,
ILHead
=
newind
;
ILHead
=
newind
;
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
}
}
void
void
...
...
src/backend/catalog/heap.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.1
4 1997/06/04 08:59:22 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.1
5 1997/08/12 22:52:07 momjian
Exp $
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
* heap_creatr() - Create an uncataloged heap relation
...
@@ -1312,7 +1312,7 @@ heap_destroy(char *relname)
...
@@ -1312,7 +1312,7 @@ heap_destroy(char *relname)
*/
*/
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
)
)
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
)
)
{
{
(
void
)
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
}
}
rdesc
->
rd_tmpunlinked
=
TRUE
;
rdesc
->
rd_tmpunlinked
=
TRUE
;
...
@@ -1336,7 +1336,7 @@ heap_destroyr(Relation rdesc)
...
@@ -1336,7 +1336,7 @@ heap_destroyr(Relation rdesc)
ReleaseRelationBuffers
(
rdesc
);
ReleaseRelationBuffers
(
rdesc
);
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
)
)
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
)
)
{
{
(
void
)
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
}
}
rdesc
->
rd_tmpunlinked
=
TRUE
;
rdesc
->
rd_tmpunlinked
=
TRUE
;
heap_close
(
rdesc
);
heap_close
(
rdesc
);
...
...
src/backend/catalog/index.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.1
5 1997/04/05 03:36:21 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.1
6 1997/08/12 22:52:09 momjian
Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -654,8 +654,8 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
...
@@ -654,8 +654,8 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* initialize null[], replace[] and value[]
* initialize null[], replace[] and value[]
* ----------------
* ----------------
*/
*/
(
void
)
memset
(
nullv
,
' '
,
Natts_pg_attribute
);
memset
(
nullv
,
' '
,
Natts_pg_attribute
);
(
void
)
memset
(
replace
,
' '
,
Natts_pg_attribute
);
memset
(
replace
,
' '
,
Natts_pg_attribute
);
/* ----------------
/* ----------------
* create the first attribute tuple.
* create the first attribute tuple.
...
@@ -935,7 +935,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
...
@@ -935,7 +935,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
newtup
=
heap_modifytuple
(
tuple
,
buffer
,
pg_index
,
values
,
nulls
,
replace
);
newtup
=
heap_modifytuple
(
tuple
,
buffer
,
pg_index
,
values
,
nulls
,
replace
);
(
void
)
heap_replace
(
pg_index
,
&
(
newtup
->
t_ctid
),
newtup
);
heap_replace
(
pg_index
,
&
(
newtup
->
t_ctid
),
newtup
);
heap_close
(
pg_index
);
heap_close
(
pg_index
);
pfree
(
predText
);
pfree
(
predText
);
...
@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
...
@@ -1429,7 +1429,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
newtup
=
heap_modifytuple
(
htup
,
buffer
,
pg_class
,
values
,
newtup
=
heap_modifytuple
(
htup
,
buffer
,
pg_class
,
values
,
nulls
,
replace
);
nulls
,
replace
);
(
void
)
heap_replace
(
pg_class
,
&
(
newtup
->
t_ctid
),
newtup
);
heap_replace
(
pg_class
,
&
(
newtup
->
t_ctid
),
newtup
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
CatalogIndexInsert
(
idescs
,
Num_pg_class_indices
,
pg_class
,
newtup
);
CatalogIndexInsert
(
idescs
,
Num_pg_class_indices
,
pg_class
,
newtup
);
CatalogCloseIndices
(
Num_pg_class_indices
,
idescs
);
CatalogCloseIndices
(
Num_pg_class_indices
,
idescs
);
...
@@ -1682,7 +1682,7 @@ index_build(Relation heapRelation,
...
@@ -1682,7 +1682,7 @@ index_build(Relation heapRelation,
* ----------------
* ----------------
*/
*/
if
(
RegProcedureIsValid
(
procedure
))
if
(
RegProcedureIsValid
(
procedure
))
(
void
)
fmgr
(
procedure
,
fmgr
(
procedure
,
heapRelation
,
heapRelation
,
indexRelation
,
indexRelation
,
numberOfAttributes
,
numberOfAttributes
,
...
...
src/backend/catalog/pg_operator.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.
9 1997/07/23 17:14:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.
10 1997/08/12 22:52:11
momjian Exp $
*
*
* NOTES
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
* these routines moved here from commands/define.c and somewhat cleaned up.
...
@@ -682,7 +682,7 @@ OperatorDef(char *operatorName,
...
@@ -682,7 +682,7 @@ OperatorDef(char *operatorName,
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
}
else
}
else
elog
(
WARN
,
"OperatorDef: no operator %d"
,
other_oid
);
elog
(
WARN
,
"OperatorDef: no operator %d"
,
other_oid
);
...
@@ -798,7 +798,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
...
@@ -798,7 +798,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
}
}
...
@@ -828,7 +828,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
...
@@ -828,7 +828,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
values
[
Anum_pg_operator_oprcom
-
1
]
=
(
Datum
)
NULL
;
values
[
Anum_pg_operator_oprcom
-
1
]
=
(
Datum
)
NULL
;
...
@@ -864,7 +864,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
...
@@ -864,7 +864,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
heap_replace
(
pg_operator_desc
,
&
itemPointerData
,
tup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
}
}
...
...
src/backend/catalog/pg_type.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.
5 1996/11/30 18:06:06
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.
6 1997/08/12 22:52:13
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -477,7 +477,7 @@ TypeCreate(char *typeName,
...
@@ -477,7 +477,7 @@ TypeCreate(char *typeName,
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
itemPointerData
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
pg_type_desc
,
&
itemPointerData
,
tup
);
heap_replace
(
pg_type_desc
,
&
itemPointerData
,
tup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
typeObjectId
=
tup
->
t_oid
;
typeObjectId
=
tup
->
t_oid
;
...
...
src/backend/commands/async.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.1
5 1997/08/12 20:15:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.1
6 1997/08/12 22:52:15
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -210,7 +210,7 @@ Async_Notify(char *relname)
...
@@ -210,7 +210,7 @@ Async_Notify(char *relname)
tdesc
,
&
isnull
);
tdesc
,
&
isnull
);
if
(
!
DatumGetInt32
(
d
))
{
if
(
!
DatumGetInt32
(
d
))
{
rTuple
=
heap_modifytuple
(
lTuple
,
b
,
lRel
,
value
,
nulls
,
repl
);
rTuple
=
heap_modifytuple
(
lTuple
,
b
,
lRel
,
value
,
nulls
,
repl
);
(
void
)
heap_replace
(
lRel
,
&
lTuple
->
t_ctid
,
rTuple
);
heap_replace
(
lRel
,
&
lTuple
->
t_ctid
,
rTuple
);
}
}
ReleaseBuffer
(
b
);
ReleaseBuffer
(
b
);
}
}
...
@@ -575,7 +575,7 @@ Async_NotifyFrontEnd()
...
@@ -575,7 +575,7 @@ Async_NotifyFrontEnd()
d
=
(
Datum
)
heap_getattr
(
lTuple
,
b
,
Anum_pg_listener_relname
,
d
=
(
Datum
)
heap_getattr
(
lTuple
,
b
,
Anum_pg_listener_relname
,
tdesc
,
&
isnull
);
tdesc
,
&
isnull
);
rTuple
=
heap_modifytuple
(
lTuple
,
b
,
lRel
,
value
,
nulls
,
repl
);
rTuple
=
heap_modifytuple
(
lTuple
,
b
,
lRel
,
value
,
nulls
,
repl
);
(
void
)
heap_replace
(
lRel
,
&
lTuple
->
t_ctid
,
rTuple
);
heap_replace
(
lRel
,
&
lTuple
->
t_ctid
,
rTuple
);
/* notifying the front end */
/* notifying the front end */
...
...
src/backend/commands/command.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
7 1997/01/02 06:18:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.
8 1997/08/12 22:52:18
momjian Exp $
*
*
* NOTES
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
* The PortalExecutorHeapMemory crap needs to be eliminated
...
@@ -82,7 +82,7 @@ PortalCleanup(Portal portal)
...
@@ -82,7 +82,7 @@ PortalCleanup(Portal portal)
* switch back to previous context
* switch back to previous context
* ----------------
* ----------------
*/
*/
(
void
)
MemoryContextSwitchTo
(
context
);
MemoryContextSwitchTo
(
context
);
PortalExecutorHeapMemory
=
(
MemoryContext
)
NULL
;
PortalExecutorHeapMemory
=
(
MemoryContext
)
NULL
;
}
}
...
@@ -174,7 +174,7 @@ PerformPortalFetch(char *name,
...
@@ -174,7 +174,7 @@ PerformPortalFetch(char *name,
* do what is possible across transaction boundries.
* do what is possible across transaction boundries.
* ----------------
* ----------------
*/
*/
(
void
)
MemoryContextSwitchTo
(
MemoryContextSwitchTo
(
(
MemoryContext
)
PortalGetHeapMemory
(
GetPortalByName
(
NULL
)));
(
MemoryContext
)
PortalGetHeapMemory
(
GetPortalByName
(
NULL
)));
}
}
...
@@ -469,7 +469,7 @@ PerformAddAttribute(char *relationName,
...
@@ -469,7 +469,7 @@ PerformAddAttribute(char *relationName,
((
Form_pg_class
)
GETSTRUCT
(
reltup
))
->
relnatts
=
maxatts
;
((
Form_pg_class
)
GETSTRUCT
(
reltup
))
->
relnatts
=
maxatts
;
oldTID
=
reltup
->
t_ctid
;
oldTID
=
reltup
->
t_ctid
;
(
void
)
heap_replace
(
relrdesc
,
&
oldTID
,
reltup
);
heap_replace
(
relrdesc
,
&
oldTID
,
reltup
);
/* keep catalog indices current */
/* keep catalog indices current */
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
ridescs
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
ridescs
);
...
...
src/backend/commands/creatinh.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.
9 1997/08/12 20:15:1
0 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.
10 1997/08/12 22:52:2
0 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -390,7 +390,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
...
@@ -390,7 +390,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
tuple
=
heap_formtuple
(
desc
,
datum
,
nullarr
);
tuple
=
heap_formtuple
(
desc
,
datum
,
nullarr
);
(
void
)
heap_insert
(
relation
,
tuple
);
heap_insert
(
relation
,
tuple
);
pfree
(
tuple
);
pfree
(
tuple
);
seqNumber
+=
1
;
seqNumber
+=
1
;
...
@@ -498,7 +498,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
...
@@ -498,7 +498,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
tuple
=
heap_formtuple
(
desc
,
datum
,
nullarr
);
tuple
=
heap_formtuple
(
desc
,
datum
,
nullarr
);
(
void
)
heap_insert
(
relation
,
tuple
);
heap_insert
(
relation
,
tuple
);
pfree
(
tuple
);
pfree
(
tuple
);
seqNumber
+=
1
;
seqNumber
+=
1
;
...
...
src/backend/commands/define.c
View file @
ea5b5357
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.1
2 1997/08/03 02:35:01
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.1
3 1997/08/12 22:52:23
momjian Exp $
*
*
* DESCRIPTION
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
* The "DefineFoo" routines take the parse tree and pick out the
...
@@ -537,7 +537,7 @@ DefineType(char *typeName, List *parameters)
...
@@ -537,7 +537,7 @@ DefineType(char *typeName, List *parameters)
* now have TypeCreate do all the real work.
* now have TypeCreate do all the real work.
* ----------------
* ----------------
*/
*/
(
void
)
TypeCreate
(
typeName
,
/* type name */
TypeCreate
(
typeName
,
/* type name */
InvalidOid
,
/* relation oid (n/a here) */
InvalidOid
,
/* relation oid (n/a here) */
internalLength
,
/* internal size */
internalLength
,
/* internal size */
externalLength
,
/* external size */
externalLength
,
/* external size */
...
@@ -559,7 +559,7 @@ DefineType(char *typeName, List *parameters)
...
@@ -559,7 +559,7 @@ DefineType(char *typeName, List *parameters)
*/
*/
shadow_type
=
makeArrayTypeName
(
typeName
);
shadow_type
=
makeArrayTypeName
(
typeName
);
(
void
)
TypeCreate
(
shadow_type
,
/* type name */
TypeCreate
(
shadow_type
,
/* type name */
InvalidOid
,
/* relation oid (n/a here) */
InvalidOid
,
/* relation oid (n/a here) */
-
1
,
/* internal size */
-
1
,
/* internal size */
-
1
,
/* external size */
-
1
,
/* external size */
...
...
src/backend/commands/purge.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/purge.c,v 1.
5 1997/07/29 16:19:26 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/purge.c,v 1.
6 1997/08/12 22:52:25 momjian
Exp $
*
*
* Note:
* Note:
* XXX There are many instances of int32 instead of ...Time. These
* XXX There are many instances of int32 instead of ...Time. These
...
@@ -149,7 +149,7 @@ RelationPurge(char *relationName,
...
@@ -149,7 +149,7 @@ RelationPurge(char *relationName,
nulls
,
replace
);
nulls
,
replace
);
/* XXX How do you detect an insertion error?? */
/* XXX How do you detect an insertion error?? */
(
void
)
heap_replace
(
relation
,
&
newTuple
->
t_ctid
,
newTuple
);
heap_replace
(
relation
,
&
newTuple
->
t_ctid
,
newTuple
);
/* keep the system catalog indices current */
/* keep the system catalog indices current */
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
...
...
src/backend/commands/rename.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.
5 1997/08/12 20:15:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.
6 1997/08/12 22:52:27
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -170,7 +170,7 @@ renameatt(char *relname,
...
@@ -170,7 +170,7 @@ renameatt(char *relname,
oldTID
=
oldatttup
->
t_ctid
;
oldTID
=
oldatttup
->
t_ctid
;
/* insert "fixed" tuple */
/* insert "fixed" tuple */
(
void
)
heap_replace
(
attrdesc
,
&
oldTID
,
oldatttup
);
heap_replace
(
attrdesc
,
&
oldTID
,
oldatttup
);
/* keep system catalog indices current */
/* keep system catalog indices current */
CatalogOpenIndices
(
Num_pg_attr_indices
,
Name_pg_attr_indices
,
idescs
);
CatalogOpenIndices
(
Num_pg_attr_indices
,
Name_pg_attr_indices
,
idescs
);
...
@@ -246,7 +246,7 @@ renamerel(char oldrelname[], char newrelname[])
...
@@ -246,7 +246,7 @@ renamerel(char oldrelname[], char newrelname[])
oldTID
=
oldreltup
->
t_ctid
;
oldTID
=
oldreltup
->
t_ctid
;
/* insert fixed rel tuple */
/* insert fixed rel tuple */
(
void
)
heap_replace
(
relrdesc
,
&
oldTID
,
oldreltup
);
heap_replace
(
relrdesc
,
&
oldTID
,
oldreltup
);
/* keep the system catalog indices current */
/* keep the system catalog indices current */
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
...
...
src/backend/commands/vacuum.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.3
7 1997/07/28 00:53:40
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.3
8 1997/08/12 22:52:29
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -146,7 +146,7 @@ vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
...
@@ -146,7 +146,7 @@ vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
strcpy
(
dest
,
col
);
strcpy
(
dest
,
col
);
va_cols
=
lappend
(
va_cols
,
dest
);
va_cols
=
lappend
(
va_cols
,
dest
);
}
}
(
void
)
MemoryContextSwitchTo
(
old
);
MemoryContextSwitchTo
(
old
);
/* initialize vacuum cleaner */
/* initialize vacuum cleaner */
vc_init
();
vc_init
();
...
@@ -222,7 +222,7 @@ void
...
@@ -222,7 +222,7 @@ void
vc_abort
()
vc_abort
()
{
{
/* on abort, remove the vacuum cleaner lock file */
/* on abort, remove the vacuum cleaner lock file */
(
void
)
unlink
(
"pg_vlock"
);
unlink
(
"pg_vlock"
);
VacuumRunning
=
false
;
VacuumRunning
=
false
;
}
}
...
@@ -354,7 +354,7 @@ vc_getrels(NameData *VacRelP)
...
@@ -354,7 +354,7 @@ vc_getrels(NameData *VacRelP)
cur
->
vrl_next
=
(
VRelList
)
palloc
(
sizeof
(
VRelListData
));
cur
->
vrl_next
=
(
VRelList
)
palloc
(
sizeof
(
VRelListData
));
cur
=
cur
->
vrl_next
;
cur
=
cur
->
vrl_next
;
}
}
(
void
)
MemoryContextSwitchTo
(
old
);
MemoryContextSwitchTo
(
old
);
cur
->
vrl_relid
=
pgctup
->
t_oid
;
cur
->
vrl_relid
=
pgctup
->
t_oid
;
cur
->
vrl_next
=
(
VRelList
)
NULL
;
cur
->
vrl_next
=
(
VRelList
)
NULL
;
...
@@ -1991,7 +1991,7 @@ vc_free(VRelList vrl)
...
@@ -1991,7 +1991,7 @@ vc_free(VRelList vrl)
pfree
(
p_vrl
);
pfree
(
p_vrl
);
}
}
(
void
)
MemoryContextSwitchTo
(
old
);
MemoryContextSwitchTo
(
old
);
}
}
/*
/*
...
...
src/backend/executor/execMain.c
View file @
ea5b5357
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.1
3 1997/05/31 16:52:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.1
4 1997/08/12 22:52:33
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -963,7 +963,7 @@ ExecDelete(TupleTableSlot *slot,
...
@@ -963,7 +963,7 @@ ExecDelete(TupleTableSlot *slot,
* delete the tuple
* delete the tuple
* ----------------
* ----------------
*/
*/
(
void
)
heap_delete
(
resultRelationDesc
,
/* relation desc */
heap_delete
(
resultRelationDesc
,
/* relation desc */
tupleid
);
/* item pointer to tuple */
tupleid
);
/* item pointer to tuple */
IncrDeleted
();
IncrDeleted
();
...
...
src/backend/executor/functions.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.
5 1997/01/22 05:26:37 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.
6 1997/08/12 22:52:35 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -294,7 +294,7 @@ postquel_execute(execution_state *es,
...
@@ -294,7 +294,7 @@ postquel_execute(execution_state *es,
if
(
es
->
status
==
F_EXEC_START
)
if
(
es
->
status
==
F_EXEC_START
)
{
{
(
void
)
postquel_start
(
es
);
postquel_start
(
es
);
es
->
status
=
F_EXEC_RUN
;
es
->
status
=
F_EXEC_RUN
;
}
}
#ifndef INDEXSCAN_PATCH
#ifndef INDEXSCAN_PATCH
...
...
src/backend/executor/nodeMergejoin.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.
6 1997/08/06 03:41:29
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.
7 1997/08/12 22:52:38
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -82,6 +82,7 @@
...
@@ -82,6 +82,7 @@
#include "executor/nodeMergejoin.h"
#include "executor/nodeMergejoin.h"
#include "executor/execdebug.h"
#include "executor/execdebug.h"
#include "utils/lsyscache.h"
#include "utils/lsyscache.h"
#include "utils/psort.h"
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
* MarkInnerTuple and RestoreInnerTuple macros
* MarkInnerTuple and RestoreInnerTuple macros
...
...
src/backend/lib/hasht.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.
3 1996/11/06 08:27:13 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/lib/Attic/hasht.c,v 1.
4 1997/08/12 22:52:42 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -33,7 +33,7 @@ HashTableWalk(HTAB *hashtable, HashtFunc function, int arg)
...
@@ -33,7 +33,7 @@ HashTableWalk(HTAB *hashtable, HashtFunc function, int arg)
int
keysize
;
int
keysize
;
keysize
=
hashtable
->
hctl
->
keysize
;
keysize
=
hashtable
->
hctl
->
keysize
;
(
void
)
hash_seq
((
HTAB
*
)
NULL
);
hash_seq
((
HTAB
*
)
NULL
);
while
((
hashent
=
hash_seq
(
hashtable
))
!=
(
long
*
)
TRUE
)
{
while
((
hashent
=
hash_seq
(
hashtable
))
!=
(
long
*
)
TRUE
)
{
if
(
hashent
==
NULL
)
if
(
hashent
==
NULL
)
elog
(
FATAL
,
"error in HashTableWalk."
);
elog
(
FATAL
,
"error in HashTableWalk."
);
...
...
src/backend/libpq/auth.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.1
2 1997/08/12 20:15:17
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.1
3 1997/08/12 22:52:45
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -174,7 +174,7 @@ pg_krb4_recvauth(int sock,
...
@@ -174,7 +174,7 @@ pg_krb4_recvauth(int sock,
key_sched
,
key_sched
,
version
);
version
);
if
(
status
!=
KSUCCESS
)
{
if
(
status
!=
KSUCCESS
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb4_recvauth: kerberos error: %s
\n
"
,
"pg_krb4_recvauth: kerberos error: %s
\n
"
,
krb_err_txt
[
status
]);
krb_err_txt
[
status
]);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -182,7 +182,7 @@ pg_krb4_recvauth(int sock,
...
@@ -182,7 +182,7 @@ pg_krb4_recvauth(int sock,
return
(
STATUS_ERROR
);
return
(
STATUS_ERROR
);
}
}
if
(
strncmp
(
version
,
PG_KRB4_VERSION
,
KRB_SENDAUTH_VLEN
))
{
if
(
strncmp
(
version
,
PG_KRB4_VERSION
,
KRB_SENDAUTH_VLEN
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb4_recvauth: protocol version !=
\"
%s
\"\n
"
,
"pg_krb4_recvauth: protocol version !=
\"
%s
\"\n
"
,
PG_KRB4_VERSION
);
PG_KRB4_VERSION
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -191,7 +191,7 @@ pg_krb4_recvauth(int sock,
...
@@ -191,7 +191,7 @@ pg_krb4_recvauth(int sock,
}
}
if
(
username
&&
*
username
&&
if
(
username
&&
*
username
&&
strncmp
(
username
,
auth_data
.
pname
,
NAMEDATALEN
))
{
strncmp
(
username
,
auth_data
.
pname
,
NAMEDATALEN
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb4_recvauth: name
\"
%s
\"
!=
\"
%s
\"\n
"
,
"pg_krb4_recvauth: name
\"
%s
\"
!=
\"
%s
\"\n
"
,
username
,
username
,
auth_data
.
pname
);
auth_data
.
pname
);
...
@@ -211,7 +211,7 @@ pg_krb4_recvauth(int sock,
...
@@ -211,7 +211,7 @@ pg_krb4_recvauth(int sock,
struct
sockaddr_in
*
raddr
,
struct
sockaddr_in
*
raddr
,
char
*
username
)
char
*
username
)
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb4_recvauth: Kerberos not implemented on this "
"pg_krb4_recvauth: Kerberos not implemented on this "
"server.
\n
"
);
"server.
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -309,7 +309,7 @@ pg_krb5_recvauth(int sock,
...
@@ -309,7 +309,7 @@ pg_krb5_recvauth(int sock,
if
(
hostp
=
strchr
(
hostp
,
'.'
))
if
(
hostp
=
strchr
(
hostp
,
'.'
))
*
hostp
=
'\0'
;
*
hostp
=
'\0'
;
if
(
code
=
krb5_parse_name
(
servbuf
,
&
server
))
{
if
(
code
=
krb5_parse_name
(
servbuf
,
&
server
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: Kerberos error %d in krb5_parse_name
\n
"
,
"pg_krb5_recvauth: Kerberos error %d in krb5_parse_name
\n
"
,
code
);
code
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_parse_name"
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_parse_name"
);
...
@@ -341,7 +341,7 @@ pg_krb5_recvauth(int sock,
...
@@ -341,7 +341,7 @@ pg_krb5_recvauth(int sock,
&
client
,
&
client
,
(
krb5_ticket
**
)
NULL
,
(
krb5_ticket
**
)
NULL
,
(
krb5_authenticator
**
)
NULL
))
{
(
krb5_authenticator
**
)
NULL
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: Kerberos error %d in krb5_recvauth
\n
"
,
"pg_krb5_recvauth: Kerberos error %d in krb5_recvauth
\n
"
,
code
);
code
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_recvauth"
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_recvauth"
);
...
@@ -356,7 +356,7 @@ pg_krb5_recvauth(int sock,
...
@@ -356,7 +356,7 @@ pg_krb5_recvauth(int sock,
* postmaster startup packet.
* postmaster startup packet.
*/
*/
if
((
code
=
krb5_unparse_name
(
client
,
&
kusername
)))
{
if
((
code
=
krb5_unparse_name
(
client
,
&
kusername
)))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: Kerberos error %d in krb5_unparse_name
\n
"
,
"pg_krb5_recvauth: Kerberos error %d in krb5_unparse_name
\n
"
,
code
);
code
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_unparse_name"
);
com_err
(
"pg_krb5_recvauth"
,
code
,
"in krb5_unparse_name"
);
...
@@ -365,7 +365,7 @@ pg_krb5_recvauth(int sock,
...
@@ -365,7 +365,7 @@ pg_krb5_recvauth(int sock,
}
}
krb5_free_principal
(
client
);
krb5_free_principal
(
client
);
if
(
!
kusername
)
{
if
(
!
kusername
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: could not decode username
\n
"
);
"pg_krb5_recvauth: could not decode username
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -373,7 +373,7 @@ pg_krb5_recvauth(int sock,
...
@@ -373,7 +373,7 @@ pg_krb5_recvauth(int sock,
}
}
kusername
=
pg_an_to_ln
(
kusername
);
kusername
=
pg_an_to_ln
(
kusername
);
if
(
username
&&
strncmp
(
username
,
kusername
,
NAMEDATALEN
))
{
if
(
username
&&
strncmp
(
username
,
kusername
,
NAMEDATALEN
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: name
\"
%s
\"
!=
\"
%s
\"\n
"
,
"pg_krb5_recvauth: name
\"
%s
\"
!=
\"
%s
\"\n
"
,
username
,
kusername
);
username
,
kusername
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -395,7 +395,7 @@ pg_krb5_recvauth(int sock,
...
@@ -395,7 +395,7 @@ pg_krb5_recvauth(int sock,
struct
sockaddr_in
*
raddr
,
struct
sockaddr_in
*
raddr
,
char
*
username
)
char
*
username
)
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"pg_krb5_recvauth: Kerberos not implemented on this "
"pg_krb5_recvauth: Kerberos not implemented on this "
"server.
\n
"
);
"server.
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -448,14 +448,14 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -448,14 +448,14 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
if
(
!
username
)
{
if
(
!
username
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: no user name passed
\n
"
);
"be_recvauth: no user name passed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
return
(
STATUS_ERROR
);
return
(
STATUS_ERROR
);
}
}
if
(
!
port
)
{
if
(
!
port
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: no port structure passed
\n
"
);
"be_recvauth: no port structure passed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -465,7 +465,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -465,7 +465,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
switch
(
msgtype
)
{
switch
(
msgtype
)
{
case
STARTUP_KRB4_MSG
:
case
STARTUP_KRB4_MSG
:
if
(
!
be_getauthsvc
(
msgtype
))
{
if
(
!
be_getauthsvc
(
msgtype
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: krb4 authentication disallowed
\n
"
);
"be_recvauth: krb4 authentication disallowed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -473,7 +473,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -473,7 +473,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
}
}
if
(
pg_krb4_recvauth
(
port
->
sock
,
&
port
->
laddr
,
&
port
->
raddr
,
if
(
pg_krb4_recvauth
(
port
->
sock
,
&
port
->
laddr
,
&
port
->
raddr
,
username
)
!=
STATUS_OK
)
{
username
)
!=
STATUS_OK
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: krb4 authentication failed
\n
"
);
"be_recvauth: krb4 authentication failed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -482,7 +482,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -482,7 +482,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
break
;
break
;
case
STARTUP_KRB5_MSG
:
case
STARTUP_KRB5_MSG
:
if
(
!
be_getauthsvc
(
msgtype
))
{
if
(
!
be_getauthsvc
(
msgtype
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: krb5 authentication disallowed
\n
"
);
"be_recvauth: krb5 authentication disallowed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -490,7 +490,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -490,7 +490,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
}
}
if
(
pg_krb5_recvauth
(
port
->
sock
,
&
port
->
laddr
,
&
port
->
raddr
,
if
(
pg_krb5_recvauth
(
port
->
sock
,
&
port
->
laddr
,
&
port
->
raddr
,
username
)
!=
STATUS_OK
)
{
username
)
!=
STATUS_OK
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: krb5 authentication failed
\n
"
);
"be_recvauth: krb5 authentication failed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -499,7 +499,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -499,7 +499,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
break
;
break
;
case
STARTUP_UNAUTH_MSG
:
case
STARTUP_UNAUTH_MSG
:
if
(
!
be_getauthsvc
(
msgtype
))
{
if
(
!
be_getauthsvc
(
msgtype
))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: "
"be_recvauth: "
"unauthenticated connections disallowed
\n
"
);
"unauthenticated connections disallowed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -509,7 +509,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -509,7 +509,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
break
;
break
;
case
STARTUP_HBA_MSG
:
case
STARTUP_HBA_MSG
:
if
(
hba_recvauth
(
port
,
sp
->
database
,
sp
->
user
,
DataDir
)
!=
STATUS_OK
)
{
if
(
hba_recvauth
(
port
,
sp
->
database
,
sp
->
user
,
DataDir
)
!=
STATUS_OK
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: host-based authentication failed
\n
"
);
"be_recvauth: host-based authentication failed
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -532,7 +532,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
...
@@ -532,7 +532,7 @@ be_recvauth(MsgType msgtype_arg, Port *port, char *username, StartupInfo* sp)
}
}
break
;
break
;
default:
default:
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_recvauth: unrecognized message type: %d
\n
"
,
"be_recvauth: unrecognized message type: %d
\n
"
,
msgtype
);
msgtype
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -577,7 +577,7 @@ be_setauthsvc(char *name)
...
@@ -577,7 +577,7 @@ be_setauthsvc(char *name)
break
;
break
;
}
}
if
(
i
==
n_authsvcs
)
{
if
(
i
==
n_authsvcs
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"be_setauthsvc: invalid name %s, ignoring...
\n
"
,
"be_setauthsvc: invalid name %s, ignoring...
\n
"
,
name
);
name
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
...
src/backend/libpq/be-fsstubs.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
1 1997/08/12 20:15:1
8 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
2 1997/08/12 22:52:4
8 momjian Exp $
*
*
* NOTES
* NOTES
* This should be moved to a more appropriate place. It is here
* This should be moved to a more appropriate place. It is here
...
@@ -290,8 +290,8 @@ lo_import(text *filename)
...
@@ -290,8 +290,8 @@ lo_import(text *filename)
}
}
}
}
(
void
)
close
(
fd
);
close
(
fd
);
(
void
)
inv_close
(
lobj
);
inv_close
(
lobj
);
return
lobjOid
;
return
lobjOid
;
}
}
...
@@ -326,7 +326,7 @@ lo_export(Oid lobjId, text *filename)
...
@@ -326,7 +326,7 @@ lo_export(Oid lobjId, text *filename)
oumask
=
umask
((
mode_t
)
0
);
oumask
=
umask
((
mode_t
)
0
);
strNcpy
(
fnamebuf
,
VARDATA
(
filename
),
VARSIZE
(
filename
)
-
VARHDRSZ
);
strNcpy
(
fnamebuf
,
VARDATA
(
filename
),
VARSIZE
(
filename
)
-
VARHDRSZ
);
fd
=
open
(
fnamebuf
,
O_CREAT
|
O_WRONLY
,
0666
);
fd
=
open
(
fnamebuf
,
O_CREAT
|
O_WRONLY
,
0666
);
(
void
)
umask
(
oumask
);
umask
(
oumask
);
if
(
fd
<
0
)
{
/* error */
if
(
fd
<
0
)
{
/* error */
elog
(
WARN
,
"lo_export: can't open unix file
\"
%s
\"
"
,
elog
(
WARN
,
"lo_export: can't open unix file
\"
%s
\"
"
,
fnamebuf
);
fnamebuf
);
...
@@ -343,8 +343,8 @@ lo_export(Oid lobjId, text *filename)
...
@@ -343,8 +343,8 @@ lo_export(Oid lobjId, text *filename)
}
}
}
}
(
void
)
inv_close
(
lobj
);
inv_close
(
lobj
);
(
void
)
close
(
fd
);
close
(
fd
);
return
1
;
return
1
;
}
}
...
...
src/backend/libpq/hba.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.1
6 1997/03/12 21:17:53 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.1
7 1997/08/12 22:52:52 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -64,7 +64,7 @@ next_token(FILE *fp, char *buf, const int bufsz) {
...
@@ -64,7 +64,7 @@ next_token(FILE *fp, char *buf, const int bufsz) {
c
=
getc
(
fp
);
c
=
getc
(
fp
);
/* Put back the char right after the token (putting back EOF is ok) */
/* Put back the char right after the token (putting back EOF is ok) */
}
}
(
void
)
ungetc
(
c
,
fp
);
ungetc
(
c
,
fp
);
}
}
*
buf
=
'\0'
;
*
buf
=
'\0'
;
}
}
...
...
src/backend/libpq/portal.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.
5 1997/08/12 20:15:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.
6 1997/08/12 22:52:55
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -74,7 +74,7 @@ static int
...
@@ -74,7 +74,7 @@ static int
in_range
(
char
*
msg
,
int
value
,
int
min
,
int
max
)
in_range
(
char
*
msg
,
int
value
,
int
min
,
int
max
)
{
{
if
(
value
<
min
||
value
>=
max
)
{
if
(
value
<
min
||
value
>=
max
)
{
(
void
)
sprintf
(
PQerrormsg
,
"FATAL: %s, %d is not in range [%d,%d)
\n
"
,
sprintf
(
PQerrormsg
,
"FATAL: %s, %d is not in range [%d,%d)
\n
"
,
msg
,
value
,
min
,
max
);
msg
,
value
,
min
,
max
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -87,7 +87,7 @@ static int
...
@@ -87,7 +87,7 @@ static int
valid_pointer
(
char
*
msg
,
void
*
ptr
)
valid_pointer
(
char
*
msg
,
void
*
ptr
)
{
{
if
(
!
ptr
)
{
if
(
!
ptr
)
{
(
void
)
sprintf
(
PQerrormsg
,
"FATAL: %s
\n
"
,
msg
);
sprintf
(
PQerrormsg
,
"FATAL: %s
\n
"
,
msg
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
return
(
0
);
return
(
0
);
...
...
src/backend/libpq/pqcomm.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.1
8 1997/08/12 20:15:24
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.1
9 1997/08/12 22:52:58
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -243,7 +243,7 @@ int
...
@@ -243,7 +243,7 @@ int
PQputline
(
char
*
s
)
PQputline
(
char
*
s
)
{
{
if
(
Pfout
)
{
if
(
Pfout
)
{
(
void
)
fputs
(
s
,
Pfout
);
fputs
(
s
,
Pfout
);
fflush
(
Pfout
);
fflush
(
Pfout
);
}
}
return
(
0
);
return
(
0
);
...
@@ -314,7 +314,7 @@ pq_getint(int b)
...
@@ -314,7 +314,7 @@ pq_getint(int b)
if
(
status
)
if
(
status
)
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_getint failed: errno=%d
\n
"
,
errno
);
"FATAL: pq_getint failed: errno=%d
\n
"
,
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -333,7 +333,7 @@ pq_putstr(char *s)
...
@@ -333,7 +333,7 @@ pq_putstr(char *s)
{
{
if
(
pqPutString
(
s
,
Pfout
))
if
(
pqPutString
(
s
,
Pfout
))
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_putstr: fputs() failed: errno=%d
\n
"
,
errno
);
"FATAL: pq_putstr: fputs() failed: errno=%d
\n
"
,
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -349,7 +349,7 @@ pq_putnchar(char *s, int n)
...
@@ -349,7 +349,7 @@ pq_putnchar(char *s, int n)
{
{
if
(
pqPutNBytes
(
s
,
n
,
Pfout
))
if
(
pqPutNBytes
(
s
,
n
,
Pfout
))
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_putnchar: fputc() failed: errno=%d
\n
"
,
"FATAL: pq_putnchar: fputc() failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -389,7 +389,7 @@ pq_putint(int i, int b)
...
@@ -389,7 +389,7 @@ pq_putint(int i, int b)
if
(
status
)
if
(
status
)
{
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_putint failed: errno=%d
\n
"
,
errno
);
"FATAL: pq_putint failed: errno=%d
\n
"
,
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -444,7 +444,7 @@ pq_getinaddr(struct sockaddr_in *sin,
...
@@ -444,7 +444,7 @@ pq_getinaddr(struct sockaddr_in *sin,
return
(
1
);
return
(
1
);
}
}
if
(
hs
->
h_addrtype
!=
AF_INET
)
{
if
(
hs
->
h_addrtype
!=
AF_INET
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_getinaddr: %s not on Internet
\n
"
,
"FATAL: pq_getinaddr: %s not on Internet
\n
"
,
host
);
host
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -473,7 +473,7 @@ pq_getinserv(struct sockaddr_in *sin, char *host, char *serv)
...
@@ -473,7 +473,7 @@ pq_getinserv(struct sockaddr_in *sin, char *host, char *serv)
if
(
*
serv
>=
'0'
&&
*
serv
<=
'9'
)
if
(
*
serv
>=
'0'
&&
*
serv
<=
'9'
)
return
(
pq_getinaddr
(
sin
,
host
,
atoi
(
serv
)));
return
(
pq_getinaddr
(
sin
,
host
,
atoi
(
serv
)));
if
(
!
(
ss
=
getservbyname
(
serv
,
NULL
)))
{
if
(
!
(
ss
=
getservbyname
(
serv
,
NULL
)))
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: pq_getinserv: unknown service: %s
\n
"
,
"FATAL: pq_getinserv: unknown service: %s
\n
"
,
serv
);
serv
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -498,7 +498,7 @@ pq_regoob(void (*fptr)())
...
@@ -498,7 +498,7 @@ pq_regoob(void (*fptr)())
#else
#else
fcntl
(
fd
,
F_SETOWN
,
getpid
());
fcntl
(
fd
,
F_SETOWN
,
getpid
());
#endif
/* hpux */
#endif
/* hpux */
(
void
)
pqsignal
(
SIGURG
,
fptr
);
pqsignal
(
SIGURG
,
fptr
);
}
}
void
void
...
@@ -559,7 +559,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
...
@@ -559,7 +559,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
memset
((
char
*
)
&
sin
,
0
,
sizeof
sin
);
memset
((
char
*
)
&
sin
,
0
,
sizeof
sin
);
if
((
fd
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
if
((
fd
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: socket() failed: errno=%d
\n
"
,
"FATAL: StreamServerPort: socket() failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -569,7 +569,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
...
@@ -569,7 +569,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
if
((
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
char
*
)
&
one
,
if
((
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
char
*
)
&
one
,
sizeof
(
one
)))
==
-
1
)
{
sizeof
(
one
)))
==
-
1
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d
\n
"
,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -581,7 +581,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
...
@@ -581,7 +581,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
sin
.
sin_port
=
htons
(
portName
);
sin
.
sin_port
=
htons
(
portName
);
if
(
bind
(
fd
,
(
struct
sockaddr
*
)
&
sin
,
sizeof
sin
)
<
0
)
{
if
(
bind
(
fd
,
(
struct
sockaddr
*
)
&
sin
,
sizeof
sin
)
<
0
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: bind() failed: errno=%d
\n
"
,
"FATAL: StreamServerPort: bind() failed: errno=%d
\n
"
,
errno
);
errno
);
pqdebug
(
"%s"
,
PQerrormsg
);
pqdebug
(
"%s"
,
PQerrormsg
);
...
@@ -597,8 +597,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
...
@@ -597,8 +597,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
* listening port non-blocking. That is not necessary (and
* listening port non-blocking. That is not necessary (and
* may tickle kernel bugs).
* may tickle kernel bugs).
(void)
fcntl(fd, F_SETFD, 1);
fcntl(fd, F_SETFD, 1);
(void)
fcntl(fd, F_SETFL, FNDELAY);
fcntl(fd, F_SETFL, FNDELAY);
*/
*/
*
fdP
=
fd
;
*
fdP
=
fd
;
...
@@ -666,7 +666,7 @@ StreamConnection(int server_fd, Port *port)
...
@@ -666,7 +666,7 @@ StreamConnection(int server_fd, Port *port)
void
void
StreamClose
(
int
sock
)
StreamClose
(
int
sock
)
{
{
(
void
)
close
(
sock
);
close
(
sock
);
}
}
/* ---------------------------
/* ---------------------------
...
@@ -692,7 +692,7 @@ StreamOpen(char *hostName, short portName, Port *port)
...
@@ -692,7 +692,7 @@ StreamOpen(char *hostName, short portName, Port *port)
/* set up the server (remote) address */
/* set up the server (remote) address */
if
(
!
(
hp
=
gethostbyname
(
hostName
))
||
hp
->
h_addrtype
!=
AF_INET
)
{
if
(
!
(
hp
=
gethostbyname
(
hostName
))
||
hp
->
h_addrtype
!=
AF_INET
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamOpen: unknown hostname: %s
\n
"
,
"FATAL: StreamOpen: unknown hostname: %s
\n
"
,
hostName
);
hostName
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -708,7 +708,7 @@ StreamOpen(char *hostName, short portName, Port *port)
...
@@ -708,7 +708,7 @@ StreamOpen(char *hostName, short portName, Port *port)
/* connect to the server */
/* connect to the server */
if
((
port
->
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
if
((
port
->
sock
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
<
0
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamOpen: socket() failed: errno=%d
\n
"
,
"FATAL: StreamOpen: socket() failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -717,7 +717,7 @@ StreamOpen(char *hostName, short portName, Port *port)
...
@@ -717,7 +717,7 @@ StreamOpen(char *hostName, short portName, Port *port)
}
}
if
(
connect
(
port
->
sock
,
(
struct
sockaddr
*
)
&
port
->
raddr
,
if
(
connect
(
port
->
sock
,
(
struct
sockaddr
*
)
&
port
->
raddr
,
sizeof
(
port
->
raddr
))
<
0
)
{
sizeof
(
port
->
raddr
))
<
0
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamOpen: connect() failed: errno=%d
\n
"
,
"FATAL: StreamOpen: connect() failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
@@ -728,7 +728,7 @@ StreamOpen(char *hostName, short portName, Port *port)
...
@@ -728,7 +728,7 @@ StreamOpen(char *hostName, short portName, Port *port)
/* fill in the client address */
/* fill in the client address */
if
(
getsockname
(
port
->
sock
,
(
struct
sockaddr
*
)
&
port
->
laddr
,
if
(
getsockname
(
port
->
sock
,
(
struct
sockaddr
*
)
&
port
->
laddr
,
&
laddrlen
)
<
0
)
{
&
laddrlen
)
<
0
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: StreamOpen: getsockname() failed: errno=%d
\n
"
,
"FATAL: StreamOpen: getsockname() failed: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
...
src/backend/libpq/pqpacket.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.
4 1997/02/14 04:15:31
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.
5 1997/08/12 22:53:00
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -214,7 +214,7 @@ PacketSend(Port *port,
...
@@ -214,7 +214,7 @@ PacketSend(Port *port,
(
struct
sockaddr
*
)
&
(
port
->
raddr
),
addrLen
);
(
struct
sockaddr
*
)
&
(
port
->
raddr
),
addrLen
);
if
(
len
<
totalLen
)
{
if
(
len
<
totalLen
)
{
(
void
)
sprintf
(
PQerrormsg
,
sprintf
(
PQerrormsg
,
"FATAL: PacketSend: couldn't send complete packet: errno=%d
\n
"
,
"FATAL: PacketSend: couldn't send complete packet: errno=%d
\n
"
,
errno
);
errno
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
...
src/backend/nodes/read.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
2 1996/11/08 05:56:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
3 1997/08/12 22:53:04
momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -33,7 +33,7 @@ stringToNode(char *str)
...
@@ -33,7 +33,7 @@ stringToNode(char *str)
{
{
void
*
retval
;
void
*
retval
;
(
void
)
lsptok
(
str
,
NULL
);
/* set the string used in lsptok */
lsptok
(
str
,
NULL
);
/* set the string used in lsptok */
retval
=
nodeRead
(
true
);
/* start reading */
retval
=
nodeRead
(
true
);
/* start reading */
return
retval
;
return
retval
;
...
...
src/backend/optimizer/geqo/geqo_eval.c
View file @
ea5b5357
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: geqo_eval.c,v 1.1
1 1997/06/10 07:53:53 vadim
Exp $
* $Id: geqo_eval.c,v 1.1
2 1997/08/12 22:53:07 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -55,14 +55,7 @@ static Rel *gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel);
...
@@ -55,14 +55,7 @@ static Rel *gimme_clauseless_join(Rel *outer_rel, Rel *inner_rel);
static
Rel
*
init_join_rel
(
Rel
*
outer_rel
,
Rel
*
inner_rel
,
JInfo
*
joininfo
);
static
Rel
*
init_join_rel
(
Rel
*
outer_rel
,
Rel
*
inner_rel
,
JInfo
*
joininfo
);
static
List
*
new_join_tlist
(
List
*
tlist
,
List
*
other_relids
,
int
first_resdomno
);
static
List
*
new_join_tlist
(
List
*
tlist
,
List
*
other_relids
,
int
first_resdomno
);
static
List
*
new_joininfo_list
(
List
*
joininfo_list
,
List
*
join_relids
);
static
List
*
new_joininfo_list
(
List
*
joininfo_list
,
List
*
join_relids
);
static
void
add_superrels
(
Rel
*
rel
,
Rel
*
super_rel
);
static
bool
nonoverlap_rels
(
Rel
*
rel1
,
Rel
*
rel2
);
static
bool
nonoverlap_sets
(
List
*
s1
,
List
*
s2
);
static
void
geqo_joinrel_size
(
Rel
*
joinrel
,
Rel
*
outer_rel
,
Rel
*
inner_rel
);
static
void
geqo_joinrel_size
(
Rel
*
joinrel
,
Rel
*
outer_rel
,
Rel
*
inner_rel
);
static
void
geqo_add_new_joininfos
(
Query
*
root
,
List
*
joinrels
,
List
*
outerrels
);
static
List
*
geqo_final_join_rels
(
List
*
join_rel_list
);
static
Rel
*
geqo_nth
(
int
stop
,
List
*
rels
);
static
Rel
*
geqo_nth
(
int
stop
,
List
*
rels
);
/*
/*
...
...
src/backend/optimizer/geqo/geqo_params.c
View file @
ea5b5357
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: geqo_params.c,v 1.
3 1997/07/24 20:12:15
momjian Exp $
* $Id: geqo_params.c,v 1.
4 1997/08/12 22:53:09
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -280,7 +280,7 @@ next_token(FILE *fp, char *buf, int bufsz)
...
@@ -280,7 +280,7 @@ next_token(FILE *fp, char *buf, int bufsz)
while
(
c
==
' '
||
c
==
'\t'
)
c
=
getc
(
fp
);
while
(
c
==
' '
||
c
==
'\t'
)
c
=
getc
(
fp
);
/* Put back the char that was non-whitespace (putting back EOF is ok) */
/* Put back the char that was non-whitespace (putting back EOF is ok) */
(
void
)
ungetc
(
c
,
fp
);
ungetc
(
c
,
fp
);
/* If we ended with a newline, return that, otherwise return 0 */
/* If we ended with a newline, return that, otherwise return 0 */
return
(
c
==
'\n'
?
'\n'
:
0
);
return
(
c
==
'\n'
?
'\n'
:
0
);
...
...
src/backend/optimizer/path/indxpath.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.
7 1997/03/18 18:39:40 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.
8 1997/08/12 22:53:12 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1020,7 +1020,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
...
@@ -1020,7 +1020,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
BOOL_TYPEID
,
/* opresulttype */
BOOL_TYPEID
,
/* opresulttype */
0
,
/* opsize */
0
,
/* opsize */
NULL
);
/* op_fcache */
NULL
);
/* op_fcache */
(
void
)
replace_opid
(
test_oper
);
replace_opid
(
test_oper
);
test_expr
=
make_opclause
(
test_oper
,
test_expr
=
make_opclause
(
test_oper
,
copyObject
(
clause_const
),
copyObject
(
clause_const
),
...
...
src/backend/parser/analyze.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.3
1 1997/08/12 20:15:31
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.3
2 1997/08/12 22:53:17
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1018,7 +1018,7 @@ makeTargetNames(ParseState *pstate, List *cols)
...
@@ -1018,7 +1018,7 @@ makeTargetNames(ParseState *pstate, List *cols)
else
else
foreach
(
tl
,
cols
)
foreach
(
tl
,
cols
)
/* elog on failure */
/* elog on failure */
(
void
)
varattno
(
pstate
->
p_target_relation
,((
Ident
*
)
lfirst
(
tl
))
->
name
);
varattno
(
pstate
->
p_target_relation
,((
Ident
*
)
lfirst
(
tl
))
->
name
);
return
cols
;
return
cols
;
}
}
...
...
src/backend/port/BSD44_derived/dl.c
View file @
ea5b5357
...
@@ -61,13 +61,13 @@ void *
...
@@ -61,13 +61,13 @@ void *
BSD44_derived_dlopen
(
const
char
*
file
,
int
num
)
BSD44_derived_dlopen
(
const
char
*
file
,
int
num
)
{
{
#ifdef __mips__
#ifdef __mips__
(
void
)
sprintf
(
error_message
,
"dlopen (%s) not supported"
,
file
);
sprintf
(
error_message
,
"dlopen (%s) not supported"
,
file
);
return
NULL
;
return
NULL
;
#else
#else
void
*
vp
;
void
*
vp
;
if
((
vp
=
dlopen
((
char
*
)
file
,
num
))
==
(
void
*
)
NULL
)
{
if
((
vp
=
dlopen
((
char
*
)
file
,
num
))
==
(
void
*
)
NULL
)
{
(
void
)
sprintf
(
error_message
,
"dlopen (%s) failed"
,
file
);
sprintf
(
error_message
,
"dlopen (%s) failed"
,
file
);
}
}
return
(
vp
);
return
(
vp
);
#endif
#endif
...
@@ -77,18 +77,18 @@ void *
...
@@ -77,18 +77,18 @@ void *
BSD44_derived_dlsym
(
void
*
handle
,
const
char
*
name
)
BSD44_derived_dlsym
(
void
*
handle
,
const
char
*
name
)
{
{
#ifdef __mips__
#ifdef __mips__
(
void
)
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
return
NULL
;
return
NULL
;
#else
#else
void
*
vp
;
void
*
vp
;
char
buf
[
BUFSIZ
];
char
buf
[
BUFSIZ
];
if
(
*
name
!=
'_'
)
{
if
(
*
name
!=
'_'
)
{
(
void
)
sprintf
(
buf
,
"_%s"
,
name
);
sprintf
(
buf
,
"_%s"
,
name
);
name
=
buf
;
name
=
buf
;
}
}
if
((
vp
=
dlsym
(
handle
,
(
char
*
)
name
))
==
(
void
*
)
NULL
)
{
if
((
vp
=
dlsym
(
handle
,
(
char
*
)
name
))
==
(
void
*
)
NULL
)
{
(
void
)
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
}
}
return
(
vp
);
return
(
vp
);
#endif
#endif
...
...
src/backend/postmaster/postmaster.c
View file @
ea5b5357
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.5
0 1997/08/12 20:15:42
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.5
1 1997/08/12 22:53:31
momjian Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -237,7 +237,7 @@ PostmasterMain(int argc, char *argv[])
...
@@ -237,7 +237,7 @@ PostmasterMain(int argc, char *argv[])
IsPostmaster
=
true
;
IsPostmaster
=
true
;
/* for security, no dir or file created can be group or other accessible */
/* for security, no dir or file created can be group or other accessible */
(
void
)
umask
((
mode_t
)
0077
);
umask
((
mode_t
)
0077
);
if
(
!
(
hostName
=
getenv
(
"PGHOST"
)))
{
if
(
!
(
hostName
=
getenv
(
"PGHOST"
)))
{
if
(
gethostname
(
hostbuf
,
MAXHOSTNAMELEN
)
<
0
)
if
(
gethostname
(
hostbuf
,
MAXHOSTNAMELEN
)
<
0
)
...
@@ -408,10 +408,10 @@ pmdaemonize(void)
...
@@ -408,10 +408,10 @@ pmdaemonize(void)
}
}
#endif
#endif
i
=
open
(
NULL_DEV
,
O_RDWR
);
i
=
open
(
NULL_DEV
,
O_RDWR
);
(
void
)
dup2
(
i
,
0
);
dup2
(
i
,
0
);
(
void
)
dup2
(
i
,
1
);
dup2
(
i
,
1
);
(
void
)
dup2
(
i
,
2
);
dup2
(
i
,
2
);
(
void
)
close
(
i
);
close
(
i
);
}
}
static
void
static
void
...
@@ -899,7 +899,7 @@ CleanupProc(int pid,
...
@@ -899,7 +899,7 @@ CleanupProc(int pid,
(
sig
==
SIGUSR1
)
(
sig
==
SIGUSR1
)
?
"SIGUSR1"
:
"SIGSTOP"
,
?
"SIGUSR1"
:
"SIGSTOP"
,
bp
->
pid
);
bp
->
pid
);
(
void
)
kill
(
bp
->
pid
,
sig
);
kill
(
bp
->
pid
,
sig
);
}
}
ProcRemove
(
bp
->
pid
);
ProcRemove
(
bp
->
pid
);
...
@@ -1101,7 +1101,7 @@ DoExec(StartupInfo *packet, int portFd)
...
@@ -1101,7 +1101,7 @@ DoExec(StartupInfo *packet, int portFd)
*/
*/
if
(
DebugLvl
>
1
)
{
if
(
DebugLvl
>
1
)
{
(
void
)
sprintf
(
debugbuf
,
"-d%d"
,
DebugLvl
);
sprintf
(
debugbuf
,
"-d%d"
,
DebugLvl
);
av
[
ac
++
]
=
debugbuf
;
av
[
ac
++
]
=
debugbuf
;
}
}
else
else
...
@@ -1120,7 +1120,7 @@ DoExec(StartupInfo *packet, int portFd)
...
@@ -1120,7 +1120,7 @@ DoExec(StartupInfo *packet, int portFd)
av
[
ac
++
]
=
mbbuf
;
av
[
ac
++
]
=
mbbuf
;
}
}
/* Tell the backend the descriptor of the fe/be socket */
/* Tell the backend the descriptor of the fe/be socket */
(
void
)
sprintf
(
portbuf
,
"-P%d"
,
portFd
);
sprintf
(
portbuf
,
"-P%d"
,
portFd
);
av
[
ac
++
]
=
portbuf
;
av
[
ac
++
]
=
portbuf
;
strNcpy
(
argbuf
,
packet
->
options
,
ARGV_SIZE
);
strNcpy
(
argbuf
,
packet
->
options
,
ARGV_SIZE
);
...
...
src/backend/regex/regcomp.c
View file @
ea5b5357
...
@@ -236,7 +236,7 @@ int cflags;
...
@@ -236,7 +236,7 @@ int cflags;
g
->
nsub
=
0
;
g
->
nsub
=
0
;
g
->
ncategories
=
1
;
/* category 0 is "everything else" */
g
->
ncategories
=
1
;
/* category 0 is "everything else" */
g
->
categories
=
&
g
->
catspace
[
-
(
CHAR_MIN
)];
g
->
categories
=
&
g
->
catspace
[
-
(
CHAR_MIN
)];
(
void
)
memset
((
char
*
)
g
->
catspace
,
0
,
NC
*
sizeof
(
cat_t
));
memset
((
char
*
)
g
->
catspace
,
0
,
NC
*
sizeof
(
cat_t
));
g
->
backrefs
=
0
;
g
->
backrefs
=
0
;
/* do it */
/* do it */
...
@@ -596,7 +596,7 @@ int starordinary; /* is a leading * an ordinary character? */
...
@@ -596,7 +596,7 @@ int starordinary; /* is a leading * an ordinary character? */
assert
(
p
->
pbegin
[
i
]
!=
0
);
assert
(
p
->
pbegin
[
i
]
!=
0
);
assert
(
OP
(
p
->
strip
[
p
->
pbegin
[
i
]])
==
OLPAREN
);
assert
(
OP
(
p
->
strip
[
p
->
pbegin
[
i
]])
==
OLPAREN
);
assert
(
OP
(
p
->
strip
[
p
->
pend
[
i
]])
==
ORPAREN
);
assert
(
OP
(
p
->
strip
[
p
->
pend
[
i
]])
==
ORPAREN
);
(
void
)
dupl
(
p
,
p
->
pbegin
[
i
]
+
1
,
p
->
pend
[
i
]);
dupl
(
p
,
p
->
pbegin
[
i
]
+
1
,
p
->
pend
[
i
]);
EMIT
(
O_BACK
,
i
);
EMIT
(
O_BACK
,
i
);
}
else
}
else
SETERROR
(
REG_ESUBREG
);
SETERROR
(
REG_ESUBREG
);
...
@@ -1115,7 +1115,7 @@ register struct parse *p;
...
@@ -1115,7 +1115,7 @@ register struct parse *p;
p
->
g
->
sets
[
i
].
ptr
=
p
->
g
->
setbits
+
css
*
(
i
/
CHAR_BIT
);
p
->
g
->
sets
[
i
].
ptr
=
p
->
g
->
setbits
+
css
*
(
i
/
CHAR_BIT
);
}
}
if
(
p
->
g
->
sets
!=
NULL
&&
p
->
g
->
setbits
!=
NULL
)
if
(
p
->
g
->
sets
!=
NULL
&&
p
->
g
->
setbits
!=
NULL
)
(
void
)
memset
((
char
*
)
p
->
g
->
setbits
+
(
nbytes
-
css
),
memset
((
char
*
)
p
->
g
->
setbits
+
(
nbytes
-
css
),
0
,
css
);
0
,
css
);
else
{
else
{
no
=
0
;
no
=
0
;
...
@@ -1273,7 +1273,7 @@ register char *cp;
...
@@ -1273,7 +1273,7 @@ register char *cp;
register size_t len = strlen(fp);
register size_t len = strlen(fp);
assert(fp != NULL);
assert(fp != NULL);
(void)
memmove(fp, fp + len + 1,
memmove(fp, fp + len + 1,
cs->smultis - (fp + len + 1 - cs->multis));
cs->smultis - (fp + len + 1 - cs->multis));
cs->smultis -= len;
cs->smultis -= len;
...
@@ -1440,7 +1440,7 @@ sopno finish; /* to this less one */
...
@@ -1440,7 +1440,7 @@ sopno finish; /* to this less one */
return
(
ret
);
return
(
ret
);
enlarge
(
p
,
p
->
ssize
+
len
);
/* this many unexpected additions */
enlarge
(
p
,
p
->
ssize
+
len
);
/* this many unexpected additions */
assert
(
p
->
ssize
>=
p
->
slen
+
len
);
assert
(
p
->
ssize
>=
p
->
slen
+
len
);
(
void
)
memcpy
((
char
*
)(
p
->
strip
+
p
->
slen
),
memcpy
((
char
*
)(
p
->
strip
+
p
->
slen
),
(
char
*
)(
p
->
strip
+
start
),
(
size_t
)
len
*
sizeof
(
sop
));
(
char
*
)(
p
->
strip
+
start
),
(
size_t
)
len
*
sizeof
(
sop
));
p
->
slen
+=
len
;
p
->
slen
+=
len
;
return
(
ret
);
return
(
ret
);
...
...
src/backend/regex/regerror.c
View file @
ea5b5357
...
@@ -135,7 +135,7 @@ size_t errbuf_size;
...
@@ -135,7 +135,7 @@ size_t errbuf_size;
if
(
errcode
&
REG_ITOA
)
{
if
(
errcode
&
REG_ITOA
)
{
if
(
r
->
code
!=
0
)
if
(
r
->
code
!=
0
)
(
void
)
strcpy
(
convbuf
,
r
->
name
);
strcpy
(
convbuf
,
r
->
name
);
else
else
sprintf
(
convbuf
,
"REG_0x%x"
,
target
);
sprintf
(
convbuf
,
"REG_0x%x"
,
target
);
assert
(
strlen
(
convbuf
)
<
sizeof
(
convbuf
));
assert
(
strlen
(
convbuf
)
<
sizeof
(
convbuf
));
...
@@ -147,9 +147,9 @@ size_t errbuf_size;
...
@@ -147,9 +147,9 @@ size_t errbuf_size;
len
=
strlen
(
s
)
+
1
;
len
=
strlen
(
s
)
+
1
;
if
(
errbuf_size
>
0
)
{
if
(
errbuf_size
>
0
)
{
if
(
errbuf_size
>
len
)
if
(
errbuf_size
>
len
)
(
void
)
strcpy
(
errbuf
,
s
);
strcpy
(
errbuf
,
s
);
else
{
else
{
(
void
)
strncpy
(
errbuf
,
s
,
errbuf_size
-
1
);
strncpy
(
errbuf
,
s
,
errbuf_size
-
1
);
errbuf
[
errbuf_size
-
1
]
=
'\0'
;
errbuf
[
errbuf_size
-
1
]
=
'\0'
;
}
}
}
}
...
...
src/backend/rewrite/rewriteHandler.c
View file @
ea5b5357
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
2 1996/11/24 05:58:57 bryanh
Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
3 1997/08/12 22:53:41 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -395,7 +395,7 @@ fireRules(Query *parsetree,
...
@@ -395,7 +395,7 @@ fireRules(Query *parsetree,
/* choose rule to fire from list of rules */
/* choose rule to fire from list of rules */
if
(
locks
==
NIL
)
{
if
(
locks
==
NIL
)
{
(
void
)
ProcessRetrieveQuery
(
parsetree
,
ProcessRetrieveQuery
(
parsetree
,
parsetree
->
rtable
,
parsetree
->
rtable
,
instead_flag
,
TRUE
);
instead_flag
,
TRUE
);
if
(
*
instead_flag
)
if
(
*
instead_flag
)
...
@@ -473,7 +473,7 @@ fireRules(Query *parsetree,
...
@@ -473,7 +473,7 @@ fireRules(Query *parsetree,
*--------------------------------------------------
*--------------------------------------------------
*/
*/
info
->
rule_action
->
rtable
=
info
->
rt
;
info
->
rule_action
->
rtable
=
info
->
rt
;
(
void
)
ProcessRetrieveQuery
(
info
->
rule_action
,
info
->
rt
,
ProcessRetrieveQuery
(
info
->
rule_action
,
info
->
rt
,
&
orig_instead_flag
,
TRUE
);
&
orig_instead_flag
,
TRUE
);
/*--------------------------------------------------
/*--------------------------------------------------
...
...
src/backend/rewrite/rewriteSupport.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.
5 1996/12/26 17:49:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.
6 1997/08/12 22:53:43
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -147,7 +147,7 @@ setRelhasrulesInRelation(Oid relationId, bool relhasrules)
...
@@ -147,7 +147,7 @@ setRelhasrulesInRelation(Oid relationId, bool relhasrules)
relp
=
(
Form_pg_class
)
GETSTRUCT
(
newTuple
);
relp
=
(
Form_pg_class
)
GETSTRUCT
(
newTuple
);
relp
->
relhasrules
=
relhasrules
;
relp
->
relhasrules
=
relhasrules
;
(
void
)
heap_replace
(
relationRelation
,
&
(
tuple
->
t_ctid
),
newTuple
);
heap_replace
(
relationRelation
,
&
(
tuple
->
t_ctid
),
newTuple
);
/* keep the catalog indices up to date */
/* keep the catalog indices up to date */
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
CatalogOpenIndices
(
Num_pg_class_indices
,
Name_pg_class_indices
,
idescs
);
...
...
src/backend/storage/buffer/bufmgr.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
5 1997/07/28 00:54:43
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.1
6 1997/08/12 22:53:46
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -248,7 +248,7 @@ ReadBufferWithBufferLock(Relation reln,
...
@@ -248,7 +248,7 @@ ReadBufferWithBufferLock(Relation reln,
if
(
extend
)
{
if
(
extend
)
{
/* new buffers are zero-filled */
/* new buffers are zero-filled */
memset
((
char
*
)
MAKE_PTR
(
bufHdr
->
data
),
0
,
BLCKSZ
);
memset
((
char
*
)
MAKE_PTR
(
bufHdr
->
data
),
0
,
BLCKSZ
);
(
void
)
smgrextend
(
bufHdr
->
bufsmgr
,
reln
,
smgrextend
(
bufHdr
->
bufsmgr
,
reln
,
(
char
*
)
MAKE_PTR
(
bufHdr
->
data
));
(
char
*
)
MAKE_PTR
(
bufHdr
->
data
));
}
}
return
(
BufferDescriptorGetBuffer
(
bufHdr
));
return
(
BufferDescriptorGetBuffer
(
bufHdr
));
...
@@ -261,7 +261,7 @@ ReadBufferWithBufferLock(Relation reln,
...
@@ -261,7 +261,7 @@ ReadBufferWithBufferLock(Relation reln,
*/
*/
if
(
extend
)
{
if
(
extend
)
{
/* new buffers are zero-filled */
/* new buffers are zero-filled */
(
void
)
memset
((
char
*
)
MAKE_PTR
(
bufHdr
->
data
),
0
,
BLCKSZ
);
memset
((
char
*
)
MAKE_PTR
(
bufHdr
->
data
),
0
,
BLCKSZ
);
status
=
smgrextend
(
bufHdr
->
bufsmgr
,
reln
,
status
=
smgrextend
(
bufHdr
->
bufsmgr
,
reln
,
(
char
*
)
MAKE_PTR
(
bufHdr
->
data
));
(
char
*
)
MAKE_PTR
(
bufHdr
->
data
));
}
else
{
}
else
{
...
@@ -1728,7 +1728,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
...
@@ -1728,7 +1728,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
break
;
break
;
}
}
(
void
)
fclose
(
fp
);
fclose
(
fp
);
kill
(
getpid
(),
SIGILL
);
kill
(
getpid
(),
SIGILL
);
}
}
...
...
src/backend/storage/file/fd.c
View file @
ea5b5357
...
@@ -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
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: fd.c,v 1.
19 1997/07/28 00:54:52
momjian Exp $
* $Id: fd.c,v 1.
20 1997/08/12 22:53:51
momjian Exp $
*
*
* NOTES:
* NOTES:
*
*
...
@@ -765,8 +765,8 @@ FileTruncate(File file, int offset)
...
@@ -765,8 +765,8 @@ FileTruncate(File file, int offset)
DO_DB
(
elog
(
DEBUG
,
"FileTruncate %d (%s)"
,
DO_DB
(
elog
(
DEBUG
,
"FileTruncate %d (%s)"
,
file
,
VfdCache
[
file
].
fileName
));
file
,
VfdCache
[
file
].
fileName
));
(
void
)
FileSync
(
file
);
FileSync
(
file
);
(
void
)
FileAccess
(
file
);
FileAccess
(
file
);
returnCode
=
ftruncate
(
VfdCache
[
file
].
fd
,
offset
);
returnCode
=
ftruncate
(
VfdCache
[
file
].
fd
,
offset
);
return
(
returnCode
);
return
(
returnCode
);
}
}
...
...
src/backend/storage/ipc/s_lock.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.1
5 1997/07/29 14:07:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.1
6 1997/08/12 22:53:55
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -100,13 +100,13 @@ S_LOCK(slock_t *lock)
...
@@ -100,13 +100,13 @@ S_LOCK(slock_t *lock)
void
void
S_UNLOCK
(
slock_t
*
lock
)
S_UNLOCK
(
slock_t
*
lock
)
{
{
(
void
)
release_lock
(
lock
);
release_lock
(
lock
);
}
}
void
void
S_INIT_LOCK
(
slock_t
*
lock
)
S_INIT_LOCK
(
slock_t
*
lock
)
{
{
(
void
)
init_lock
(
lock
);
init_lock
(
lock
);
}
}
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
...
@@ -138,13 +138,13 @@ S_LOCK(slock_t *lock)
...
@@ -138,13 +138,13 @@ S_LOCK(slock_t *lock)
void
void
S_UNLOCK
(
slock_t
*
lock
)
S_UNLOCK
(
slock_t
*
lock
)
{
{
(
void
)
msem_unlock
(
lock
,
0
);
msem_unlock
(
lock
,
0
);
}
}
void
void
S_INIT_LOCK
(
slock_t
*
lock
)
S_INIT_LOCK
(
slock_t
*
lock
)
{
{
(
void
)
msem_init
(
lock
,
MSEM_UNLOCKED
);
msem_init
(
lock
,
MSEM_UNLOCKED
);
}
}
int
int
...
...
src/backend/storage/ipc/shmem.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.
9 1997/06/06 22:04:04 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.
10 1997/08/12 22:53:56 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -544,7 +544,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
...
@@ -544,7 +544,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
if
(
!
structPtr
)
{
if
(
!
structPtr
)
{
/* out of memory */
/* out of memory */
Assert
(
BindingTable
);
Assert
(
BindingTable
);
(
void
)
hash_search
(
BindingTable
,(
char
*
)
&
item
,
HASH_REMOVE
,
foundPtr
);
hash_search
(
BindingTable
,(
char
*
)
&
item
,
HASH_REMOVE
,
foundPtr
);
SpinRelease
(
BindingLock
);
SpinRelease
(
BindingLock
);
*
foundPtr
=
FALSE
;
*
foundPtr
=
FALSE
;
...
@@ -578,7 +578,7 @@ TransactionIdIsInProgress (TransactionId xid)
...
@@ -578,7 +578,7 @@ TransactionIdIsInProgress (TransactionId xid)
SpinAcquire
(
BindingLock
);
SpinAcquire
(
BindingLock
);
(
void
)
hash_seq
((
HTAB
*
)
NULL
);
hash_seq
((
HTAB
*
)
NULL
);
while
(
(
result
=
(
BindingEnt
*
)
hash_seq
(
BindingTable
))
!=
NULL
)
while
(
(
result
=
(
BindingEnt
*
)
hash_seq
(
BindingTable
))
!=
NULL
)
{
{
if
(
result
==
(
BindingEnt
*
)
TRUE
)
if
(
result
==
(
BindingEnt
*
)
TRUE
)
...
...
src/backend/storage/ipc/sinval.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.
6 1997/01/08 08:32:04 bryanh
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.
7 1997/08/12 22:53:58 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -143,7 +143,7 @@ RegisterSharedInvalid(int cacheId, /* XXX */
...
@@ -143,7 +143,7 @@ RegisterSharedInvalid(int cacheId, /* XXX */
}
}
/* write again */
/* write again */
(
void
)
SISetDataEntry
(
shmInvalBuffer
,
&
newInvalid
);
SISetDataEntry
(
shmInvalBuffer
,
&
newInvalid
);
}
}
SpinRelease
(
SInvalLock
);
SpinRelease
(
SInvalLock
);
}
}
...
...
src/backend/storage/ipc/sinvaladt.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.
4 1997/07/24 20:14:15
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.
5 1997/08/12 22:54:01
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -667,8 +667,8 @@ SISegInit(SISeg *segP)
...
@@ -667,8 +667,8 @@ SISegInit(SISeg *segP)
SISetStartFreeSpace
(
segP
,
0
);
SISetStartFreeSpace
(
segP
,
0
);
SISetStartEntryChain
(
segP
,
InvalidOffset
);
SISetStartEntryChain
(
segP
,
InvalidOffset
);
SISetEndEntryChain
(
segP
,
InvalidOffset
);
SISetEndEntryChain
(
segP
,
InvalidOffset
);
(
void
)
SISetNumEntries
(
segP
,
0
);
SISetNumEntries
(
segP
,
0
);
(
void
)
SISetMaxNumEntries
(
segP
,
MAXNUMMESSAGES
);
SISetMaxNumEntries
(
segP
,
MAXNUMMESSAGES
);
for
(
i
=
0
;
i
<
MaxBackendId
;
i
++
)
{
for
(
i
=
0
;
i
<
MaxBackendId
;
i
++
)
{
segP
->
procState
[
i
].
limit
=
-
1
;
/* no backend active !!*/
segP
->
procState
[
i
].
limit
=
-
1
;
/* no backend active !!*/
segP
->
procState
[
i
].
resetState
=
false
;
segP
->
procState
[
i
].
resetState
=
false
;
...
...
src/backend/storage/large_object/inv_api.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.1
1 1997/07/28 00:55:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.1
2 1997/08/12 22:54:04
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -127,11 +127,11 @@ inv_create(int flags)
...
@@ -127,11 +127,11 @@ inv_create(int flags)
/* this is pretty painful... want a tuple descriptor */
/* this is pretty painful... want a tuple descriptor */
tupdesc
=
CreateTemplateTupleDesc
(
2
);
tupdesc
=
CreateTemplateTupleDesc
(
2
);
(
void
)
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
1
,
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
1
,
"olastbye"
,
"olastbye"
,
"int4"
,
"int4"
,
0
,
false
);
0
,
false
);
(
void
)
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
2
,
TupleDescInitEntry
(
tupdesc
,
(
AttrNumber
)
2
,
"odata"
,
"odata"
,
"bytea"
,
"bytea"
,
0
,
false
);
0
,
false
);
...
@@ -140,7 +140,7 @@ inv_create(int flags)
...
@@ -140,7 +140,7 @@ inv_create(int flags)
* will be located on whatever storage manager the user requested.
* will be located on whatever storage manager the user requested.
*/
*/
(
void
)
heap_create
(
objname
,
heap_create
(
objname
,
objname
,
objname
,
(
int
)
archchar
,
smgr
,
(
int
)
archchar
,
smgr
,
tupdesc
);
tupdesc
);
...
@@ -1147,7 +1147,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
...
@@ -1147,7 +1147,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
*/
*/
if
(
buf
!=
InvalidBuffer
)
if
(
buf
!=
InvalidBuffer
)
(
void
)
ReleaseBuffer
(
buf
);
ReleaseBuffer
(
buf
);
htup
=
heap_fetch
(
hreln
,
NowTimeQual
,
&
(
res
->
heap_iptr
),
&
buf
);
htup
=
heap_fetch
(
hreln
,
NowTimeQual
,
&
(
res
->
heap_iptr
),
&
buf
);
...
...
src/backend/storage/lmgr/lock.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.
9 1997/03/15 01:23:58 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.
10 1997/08/12 22:54:07 momjian
Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -256,7 +256,7 @@ LockTabInit(char *tabName,
...
@@ -256,7 +256,7 @@ LockTabInit(char *tabName,
if
(
!
ltable
)
if
(
!
ltable
)
{
{
elog
(
NOTICE
,
"LockTabInit: couldn't malloc lock table %s
\n
"
,
tabName
);
elog
(
NOTICE
,
"LockTabInit: couldn't malloc lock table %s
\n
"
,
tabName
);
(
void
)
pfree
(
shmemName
);
pfree
(
shmemName
);
return
(
INVALID_TABLEID
);
return
(
INVALID_TABLEID
);
}
}
...
@@ -349,7 +349,7 @@ LockTabInit(char *tabName,
...
@@ -349,7 +349,7 @@ LockTabInit(char *tabName,
SpinRelease
(
LockMgrLock
);
SpinRelease
(
LockMgrLock
);
(
void
)
pfree
(
shmemName
);
pfree
(
shmemName
);
if
(
status
)
if
(
status
)
return
(
ltable
->
ctl
->
tableId
);
return
(
ltable
->
ctl
->
tableId
);
...
@@ -1057,7 +1057,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
...
@@ -1057,7 +1057,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
* himself.
* himself.
* --------------------------
* --------------------------
*/
*/
(
void
)
ProcLockWakeup
(
&
(
lock
->
waitProcs
),
(
char
*
)
ltable
,
(
char
*
)
lock
);
ProcLockWakeup
(
&
(
lock
->
waitProcs
),
(
char
*
)
ltable
,
(
char
*
)
lock
);
}
}
SpinRelease
(
masterLock
);
SpinRelease
(
masterLock
);
...
@@ -1286,7 +1286,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue)
...
@@ -1286,7 +1286,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue)
* --------------------
* --------------------
*/
*/
waitQueue
=
&
(
lock
->
waitProcs
);
waitQueue
=
&
(
lock
->
waitProcs
);
(
void
)
ProcLockWakeup
(
waitQueue
,
(
char
*
)
ltable
,
(
char
*
)
lock
);
ProcLockWakeup
(
waitQueue
,
(
char
*
)
ltable
,
(
char
*
)
lock
);
}
}
#ifdef USER_LOCKS
#ifdef USER_LOCKS
...
...
src/backend/storage/lmgr/multi.c
View file @
ea5b5357
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
2 1996/11/03 05:07:31 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
3 1997/08/12 22:54:09 momjian
Exp $
*
*
* NOTES:
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
* (1) The lock.c module assumes that the caller here is doing
...
@@ -275,7 +275,7 @@ MultiAcquire(LockTableId tableId,
...
@@ -275,7 +275,7 @@ MultiAcquire(LockTableId tableId,
* the last level lock we successfully acquired
* the last level lock we successfully acquired
*/
*/
retStatus
=
FALSE
;
retStatus
=
FALSE
;
(
void
)
MultiRelease
(
tableId
,
tag
,
lockt
,
i
);
MultiRelease
(
tableId
,
tag
,
lockt
,
i
);
/* now leave the loop. Don't try for any more locks */
/* now leave the loop. Don't try for any more locks */
break
;
break
;
}
}
...
...
src/backend/storage/smgr/md.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
6 1997/08/12 20:15:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.1
7 1997/08/12 22:54:13
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -90,7 +90,7 @@ mdinit()
...
@@ -90,7 +90,7 @@ mdinit()
oldcxt
=
MemoryContextSwitchTo
(
MdCxt
);
oldcxt
=
MemoryContextSwitchTo
(
MdCxt
);
Md_fdvec
=
(
MdfdVec
*
)
palloc
(
Nfds
*
sizeof
(
MdfdVec
));
Md_fdvec
=
(
MdfdVec
*
)
palloc
(
Nfds
*
sizeof
(
MdfdVec
));
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
if
(
Md_fdvec
==
(
MdfdVec
*
)
NULL
)
if
(
Md_fdvec
==
(
MdfdVec
*
)
NULL
)
return
(
SM_FAIL
);
return
(
SM_FAIL
);
...
@@ -193,7 +193,7 @@ mdunlink(Relation reln)
...
@@ -193,7 +193,7 @@ mdunlink(Relation reln)
pfree
(
ov
);
pfree
(
ov
);
}
}
Md_fdvec
[
fd
].
mdfd_chain
=
(
MdfdVec
*
)
NULL
;
Md_fdvec
[
fd
].
mdfd_chain
=
(
MdfdVec
*
)
NULL
;
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
_fdvec_free
(
fd
);
_fdvec_free
(
fd
);
...
@@ -314,7 +314,7 @@ mdclose(Relation reln)
...
@@ -314,7 +314,7 @@ mdclose(Relation reln)
pfree
(
ov
);
pfree
(
ov
);
}
}
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
Md_fdvec
[
fd
].
mdfd_chain
=
(
MdfdVec
*
)
NULL
;
Md_fdvec
[
fd
].
mdfd_chain
=
(
MdfdVec
*
)
NULL
;
_fdvec_free
(
fd
);
_fdvec_free
(
fd
);
...
@@ -487,7 +487,7 @@ mdblindwrt(char *dbstr,
...
@@ -487,7 +487,7 @@ mdblindwrt(char *dbstr,
/* seek to the right spot */
/* seek to the right spot */
seekpos
=
(
long
)
(
BLCKSZ
*
(
blkno
%
RELSEG_SIZE
));
seekpos
=
(
long
)
(
BLCKSZ
*
(
blkno
%
RELSEG_SIZE
));
if
(
lseek
(
fd
,
seekpos
,
SEEK_SET
)
!=
seekpos
)
{
if
(
lseek
(
fd
,
seekpos
,
SEEK_SET
)
!=
seekpos
)
{
(
void
)
close
(
fd
);
close
(
fd
);
return
(
SM_FAIL
);
return
(
SM_FAIL
);
}
}
...
@@ -668,7 +668,7 @@ int _fdvec_alloc ()
...
@@ -668,7 +668,7 @@ int _fdvec_alloc ()
memmove
(
nvec
,
(
char
*
)
Md_fdvec
,
CurFd
*
sizeof
(
MdfdVec
));
memmove
(
nvec
,
(
char
*
)
Md_fdvec
,
CurFd
*
sizeof
(
MdfdVec
));
pfree
(
Md_fdvec
);
pfree
(
Md_fdvec
);
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
Md_fdvec
=
nvec
;
Md_fdvec
=
nvec
;
...
@@ -735,7 +735,7 @@ _mdfd_openseg(Relation reln, int segno, int oflags)
...
@@ -735,7 +735,7 @@ _mdfd_openseg(Relation reln, int segno, int oflags)
/* allocate an mdfdvec entry for it */
/* allocate an mdfdvec entry for it */
oldcxt
=
MemoryContextSwitchTo
(
MdCxt
);
oldcxt
=
MemoryContextSwitchTo
(
MdCxt
);
v
=
(
MdfdVec
*
)
palloc
(
sizeof
(
MdfdVec
));
v
=
(
MdfdVec
*
)
palloc
(
sizeof
(
MdfdVec
));
(
void
)
MemoryContextSwitchTo
(
oldcxt
);
MemoryContextSwitchTo
(
oldcxt
);
/* fill the entry */
/* fill the entry */
v
->
mdfd_vfd
=
fd
;
v
->
mdfd_vfd
=
fd
;
...
...
src/backend/tcop/aclchk.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.1
0 1997/05/22 00:15:21 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.1
1 1997/08/12 22:54:17 momjian
Exp $
*
*
* NOTES
* NOTES
* See acl.h.
* See acl.h.
...
@@ -165,7 +165,7 @@ ChangeAcl(char *relname,
...
@@ -165,7 +165,7 @@ ChangeAcl(char *relname,
ItemPointerCopy
(
&
htp
->
t_ctid
,
&
tmp_ipd
);
ItemPointerCopy
(
&
htp
->
t_ctid
,
&
tmp_ipd
);
/* XXX handle index on pg_class? */
/* XXX handle index on pg_class? */
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
relation
,
&
tmp_ipd
,
htp
);
heap_replace
(
relation
,
&
tmp_ipd
,
htp
);
setheapoverride
(
false
);
setheapoverride
(
false
);
heap_endscan
(
hsdp
);
heap_endscan
(
hsdp
);
...
...
src/backend/tcop/dest.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.
5 1997/01/10 20:19:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.
6 1997/08/12 22:54:19
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -188,7 +188,7 @@ NullCommand(CommandDest dest)
...
@@ -188,7 +188,7 @@ NullCommand(CommandDest dest)
}
}
pq_flush();
pq_flush();
PQcleanNotify(); /* garbage collect */
PQcleanNotify(); /* garbage collect */
(void)
MemoryContextSwitchTo(orig);
MemoryContextSwitchTo(orig);
#endif
#endif
/* ----------------
/* ----------------
* tell the fe that the last of the queries has finished
* tell the fe that the last of the queries has finished
...
...
src/backend/utils/adt/arrayfuncs.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.1
2 1997/07/29 15:51:33 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.1
3 1997/08/12 22:54:24 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -717,7 +717,7 @@ array_ref(ArrayType *array,
...
@@ -717,7 +717,7 @@ array_ref(ArrayType *array,
if
(
*
isNull
)
RETURN_NULL
;
if
(
*
isNull
)
RETURN_NULL
;
if
(
VARSIZE
(
v
)
-
4
<
elmlen
)
if
(
VARSIZE
(
v
)
-
4
<
elmlen
)
RETURN_NULL
;
RETURN_NULL
;
(
void
)
lo_close
(
fd
);
lo_close
(
fd
);
retval
=
(
char
*
)
_ArrayCast
((
char
*
)
VARDATA
(
v
),
reftype
,
elmlen
);
retval
=
(
char
*
)
_ArrayCast
((
char
*
)
VARDATA
(
v
),
reftype
,
elmlen
);
if
(
reftype
==
0
)
{
/* not by value */
if
(
reftype
==
0
)
{
/* not by value */
char
*
tempdata
=
palloc
(
elmlen
);
char
*
tempdata
=
palloc
(
elmlen
);
...
@@ -847,8 +847,8 @@ array_clip(ArrayType *array,
...
@@ -847,8 +847,8 @@ array_clip(ArrayType *array,
_ReadArray
(
lowerIndx
,
upperIndx
,
len
,
fd
,
newfd
,
array
,
1
,
isNull
);
_ReadArray
(
lowerIndx
,
upperIndx
,
len
,
fd
,
newfd
,
array
,
1
,
isNull
);
}
}
#ifdef LOARRAY
#ifdef LOARRAY
(
void
)
LOclose
(
fd
);
LOclose
(
fd
);
(
void
)
LOclose
(
newfd
);
LOclose
(
newfd
);
#endif
#endif
if
(
*
isNull
)
{
if
(
*
isNull
)
{
pfree
(
newArr
);
pfree
(
newArr
);
...
@@ -944,7 +944,7 @@ array_set(ArrayType *array,
...
@@ -944,7 +944,7 @@ array_set(ArrayType *array,
RETURN_NULL;
RETURN_NULL;
*/
*/
pfree
(
v
);
pfree
(
v
);
(
void
)
lo_close
(
fd
);
lo_close
(
fd
);
return
((
char
*
)
array
);
return
((
char
*
)
array
);
}
}
if
(
elmlen
>
0
)
{
if
(
elmlen
>
0
)
{
...
@@ -1045,12 +1045,12 @@ array_assgn(ArrayType *array,
...
@@ -1045,12 +1045,12 @@ array_assgn(ArrayType *array,
return
((
char
*
)
array
);
return
((
char
*
)
array
);
#endif
#endif
_LOArrayRange
(
lowerIndx
,
upperIndx
,
len
,
fd
,
newfd
,
array
,
1
,
isNull
);
_LOArrayRange
(
lowerIndx
,
upperIndx
,
len
,
fd
,
newfd
,
array
,
1
,
isNull
);
(
void
)
lo_close
(
newfd
);
lo_close
(
newfd
);
}
else
{
}
else
{
_LOArrayRange
(
lowerIndx
,
upperIndx
,
len
,
fd
,
(
int
)
ARR_DATA_PTR
(
newArr
),
_LOArrayRange
(
lowerIndx
,
upperIndx
,
len
,
fd
,
(
int
)
ARR_DATA_PTR
(
newArr
),
array
,
0
,
isNull
);
array
,
0
,
isNull
);
}
}
(
void
)
lo_close
(
fd
);
lo_close
(
fd
);
return
((
char
*
)
array
);
return
((
char
*
)
array
);
}
}
_ArrayRange
(
lowerIndx
,
upperIndx
,
len
,
ARR_DATA_PTR
(
newArr
),
array
,
0
);
_ArrayRange
(
lowerIndx
,
upperIndx
,
len
,
ARR_DATA_PTR
(
newArr
),
array
,
0
);
...
...
src/backend/utils/adt/date.c
View file @
ea5b5357
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.1
1 1997/08/12 20:15:57
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.1
2 1997/08/12 22:54:26
momjian Exp $
*
*
* NOTES
* NOTES
* This code is actually (almost) unused.
* This code is actually (almost) unused.
...
@@ -214,10 +214,10 @@ reltime2tm(int32 time, struct tm *tm)
...
@@ -214,10 +214,10 @@ reltime2tm(int32 time, struct tm *tm)
if
(
quantity
>
1
||
quantity
<
-
1
)
if
(
quantity
>
1
||
quantity
<
-
1
)
unitnr
++
;
/* adjust index for PLURAL of unit */
unitnr
++
;
/* adjust index for PLURAL of unit */
if
(
quantity
>=
0
)
if
(
quantity
>=
0
)
(
void
)
sprintf
(
timestring
,
"%c %lu %s"
,
RELTIME_LABEL
,
sprintf
(
timestring
,
"%c %lu %s"
,
RELTIME_LABEL
,
quantity
,
unit_tab
[
unitnr
]);
quantity
,
unit_tab
[
unitnr
]);
else
else
(
void
)
sprintf
(
timestring
,
"%c %lu %s %s"
,
RELTIME_LABEL
,
sprintf
(
timestring
,
"%c %lu %s %s"
,
RELTIME_LABEL
,
(
quantity
*
-
1
),
unit_tab
[
unitnr
],
RELTIME_PAST
);
(
quantity
*
-
1
),
unit_tab
[
unitnr
],
RELTIME_PAST
);
return
(
timestring
);
return
(
timestring
);
}
}
...
...
src/backend/utils/adt/geo_ops.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.1
3 1997/07/29 16:08:18 thomas
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.1
4 1997/08/12 22:54:29 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -108,7 +108,7 @@ fprintf( stderr, "single_decode- (%x) try decoding %s to %g\n", (cp-str), str, *
...
@@ -108,7 +108,7 @@ fprintf( stderr, "single_decode- (%x) try decoding %s to %g\n", (cp-str), str, *
int
single_encode
(
float8
x
,
char
*
str
)
int
single_encode
(
float8
x
,
char
*
str
)
{
{
(
void
)
sprintf
(
str
,
"%.*g"
,
digits8
,
x
);
sprintf
(
str
,
"%.*g"
,
digits8
,
x
);
return
(
TRUE
);
return
(
TRUE
);
}
/* single_encode() */
}
/* single_encode() */
...
@@ -144,7 +144,7 @@ int pair_decode(char *str, float8 *x, float8 *y, char **s)
...
@@ -144,7 +144,7 @@ int pair_decode(char *str, float8 *x, float8 *y, char **s)
int
pair_encode
(
float8
x
,
float8
y
,
char
*
str
)
int
pair_encode
(
float8
x
,
float8
y
,
char
*
str
)
{
{
(
void
)
sprintf
(
str
,
"%.*g,%.*g"
,
digits8
,
x
,
digits8
,
y
);
sprintf
(
str
,
"%.*g,%.*g"
,
digits8
,
x
,
digits8
,
y
);
return
(
TRUE
);
return
(
TRUE
);
}
}
...
...
src/backend/utils/adt/nabstime.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.
29 1997/08/12 20:16:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.
30 1997/08/12 22:54:32
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -53,7 +53,7 @@ GetCurrentAbsoluteTime(void)
...
@@ -53,7 +53,7 @@ GetCurrentAbsoluteTime(void)
#else
/* ! USE_POSIX_TIME */
#else
/* ! USE_POSIX_TIME */
struct
timeb
tb
;
/* the old V7-ism */
struct
timeb
tb
;
/* the old V7-ism */
(
void
)
ftime
(
&
tb
);
ftime
(
&
tb
);
now
=
tb
.
time
;
now
=
tb
.
time
;
#endif
#endif
...
@@ -111,7 +111,7 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm *tm, char *tzn)
...
@@ -111,7 +111,7 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm *tm, char *tzn)
#else
/* ! USE_POSIX_TIME */
#else
/* ! USE_POSIX_TIME */
struct
timeb
tb
;
/* the old V7-ism */
struct
timeb
tb
;
/* the old V7-ism */
(
void
)
ftime
(
&
tb
);
ftime
(
&
tb
);
#endif
#endif
#ifdef USE_POSIX_TIME
#ifdef USE_POSIX_TIME
...
...
src/backend/utils/adt/numutils.c
View file @
ea5b5357
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.1
1 1997/08/12 20:16:02
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.1
2 1997/08/12 22:54:34
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -142,8 +142,8 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
...
@@ -142,8 +142,8 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
char
fmt
[
256
];
char
fmt
[
256
];
int
ret
;
int
ret
;
(
void
)
sprintf
(
fmt
,
"%%%d.%d%c"
,
width
,
prec1
,
format
);
sprintf
(
fmt
,
"%%%d.%d%c"
,
width
,
prec1
,
format
);
(
void
)
sprintf
(
out
,
fmt
,
value
);
sprintf
(
out
,
fmt
,
value
);
if
((
ret
=
strlen
(
out
))
>
width
)
{
if
((
ret
=
strlen
(
out
))
>
width
)
{
memset
(
ascii
,
'*'
,
width
-
2
);
memset
(
ascii
,
'*'
,
width
-
2
);
ascii
[
width
]
=
0
;
ascii
[
width
]
=
0
;
...
...
src/backend/utils/adt/regexp.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.
6 1997/08/12 20:16:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.
7 1997/08/12 22:54:36
momjian Exp $
*
*
* Alistair Crooks added the code for the regex caching
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
* agc - cached the regular expressions used - there's a good chance
...
@@ -119,7 +119,7 @@ RE_compile_and_execute(struct varlena *text_re, char *text, int cflags)
...
@@ -119,7 +119,7 @@ RE_compile_and_execute(struct varlena *text_re, char *text, int cflags)
/* use malloc/free for the cre_s field because the storage
/* use malloc/free for the cre_s field because the storage
has to persist across transactions */
has to persist across transactions */
rev
[
oldest
].
cre_s
=
(
char
*
)
malloc
(
n
+
1
);
rev
[
oldest
].
cre_s
=
(
char
*
)
malloc
(
n
+
1
);
(
void
)
memmove
(
rev
[
oldest
].
cre_s
,
re
,
n
);
memmove
(
rev
[
oldest
].
cre_s
,
re
,
n
);
rev
[
oldest
].
cre_s
[
n
]
=
0
;
rev
[
oldest
].
cre_s
[
n
]
=
0
;
rev
[
oldest
].
cre_text
=
text_re
;
rev
[
oldest
].
cre_text
=
text_re
;
rev
[
oldest
].
cre_lru
=
++
lru
;
rev
[
oldest
].
cre_lru
=
++
lru
;
...
...
src/backend/utils/adt/sets.c
View file @
ea5b5357
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.
4 1997/01/10 20:19:49
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.
5 1997/08/12 22:54:38
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -129,7 +129,7 @@ SetDefine(char *querystr, char *typename)
...
@@ -129,7 +129,7 @@ SetDefine(char *querystr, char *typename)
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
ipdata
);
ItemPointerCopy
(
&
tup
->
t_ctid
,
&
ipdata
);
setheapoverride
(
true
);
setheapoverride
(
true
);
(
void
)
heap_replace
(
procrel
,
&
ipdata
,
newtup
);
heap_replace
(
procrel
,
&
ipdata
,
newtup
);
setheapoverride
(
false
);
setheapoverride
(
false
);
setoid
=
newtup
->
t_oid
;
setoid
=
newtup
->
t_oid
;
...
...
src/backend/utils/cache/relcache.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
1 1997/08/03 02:37:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.1
2 1997/08/12 22:54:41
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1607,7 +1607,7 @@ init_irels(void)
...
@@ -1607,7 +1607,7 @@ init_irels(void)
return
;
return
;
}
}
(
void
)
FileSeek
(
fd
,
0L
,
SEEK_SET
);
FileSeek
(
fd
,
0L
,
SEEK_SET
);
for
(
relno
=
0
;
relno
<
Num_indices_bootstrap
;
relno
++
)
{
for
(
relno
=
0
;
relno
<
Num_indices_bootstrap
;
relno
++
)
{
/* first read the relation descriptor length*/
/* first read the relation descriptor length*/
...
@@ -1748,7 +1748,7 @@ write_irels(void)
...
@@ -1748,7 +1748,7 @@ write_irels(void)
if
(
fd
<
0
)
if
(
fd
<
0
)
elog
(
FATAL
,
"cannot create init file %s"
,
INIT_FILENAME
);
elog
(
FATAL
,
"cannot create init file %s"
,
INIT_FILENAME
);
(
void
)
FileSeek
(
fd
,
0L
,
SEEK_SET
);
FileSeek
(
fd
,
0L
,
SEEK_SET
);
/*
/*
* Build a relation descriptor for pg_attnumind without resort to the
* Build a relation descriptor for pg_attnumind without resort to the
...
@@ -1853,5 +1853,5 @@ write_irels(void)
...
@@ -1853,5 +1853,5 @@ write_irels(void)
ird
->
rd_rel
=
relform
;
ird
->
rd_rel
=
relform
;
}
}
(
void
)
FileClose
(
fd
);
FileClose
(
fd
);
}
}
src/backend/utils/error/elog.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.1
6 1997/07/24 20:16:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.1
7 1997/08/12 22:54:44
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -197,7 +197,7 @@ DebugFileOpen(void)
...
@@ -197,7 +197,7 @@ DebugFileOpen(void)
elog
(
FATAL
,
"DebugFileOpen: open of %s: %m"
,
elog
(
FATAL
,
"DebugFileOpen: open of %s: %m"
,
OutputFileName
);
OutputFileName
);
istty
=
isatty
(
fd
);
istty
=
isatty
(
fd
);
(
void
)
close
(
fd
);
close
(
fd
);
/* If the file is a tty and we're running under the
/* If the file is a tty and we're running under the
* postmaster, try to send stdout there as well (if it
* postmaster, try to send stdout there as well (if it
* isn't a tty then stderr will block out stdout, so we
* isn't a tty then stderr will block out stdout, so we
...
...
src/backend/utils/error/exc.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.1
3 1997/03/26 03:27:04 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.1
4 1997/08/12 22:54:46 momjian
Exp $
*
*
* NOTE
* NOTE
* XXX this code needs improvement--check for state violations and
* XXX this code needs improvement--check for state violations and
...
@@ -99,34 +99,34 @@ ExcPrint(Exception *excP,
...
@@ -99,34 +99,34 @@ ExcPrint(Exception *excP,
data
=
data
;
data
=
data
;
#endif
#endif
(
void
)
fflush
(
stdout
);
/* In case stderr is buffered */
fflush
(
stdout
);
/* In case stderr is buffered */
#if 0
#if 0
if (ProgramName != NULL && *ProgramName != '\0')
if (ProgramName != NULL && *ProgramName != '\0')
(void)
fprintf(stderr, "%s: ", ProgramName);
fprintf(stderr, "%s: ", ProgramName);
#endif
#endif
if
(
message
!=
NULL
)
if
(
message
!=
NULL
)
(
void
)
fprintf
(
stderr
,
"%s"
,
message
);
fprintf
(
stderr
,
"%s"
,
message
);
else
if
(
excP
->
message
!=
NULL
)
else
if
(
excP
->
message
!=
NULL
)
(
void
)
fprintf
(
stderr
,
"%s"
,
excP
->
message
);
fprintf
(
stderr
,
"%s"
,
excP
->
message
);
else
else
#ifdef lint
#ifdef lint
(
void
)
fprintf
(
stderr
,
"UNNAMED EXCEPTION 0x%lx"
,
excP
);
fprintf
(
stderr
,
"UNNAMED EXCEPTION 0x%lx"
,
excP
);
#else
#else
(
void
)
fprintf
(
stderr
,
"UNNAMED EXCEPTION 0x%lx"
,
(
long
)
excP
);
fprintf
(
stderr
,
"UNNAMED EXCEPTION 0x%lx"
,
(
long
)
excP
);
#endif
#endif
(
void
)
fprintf
(
stderr
,
" (%ld)"
,
detail
);
fprintf
(
stderr
,
" (%ld)"
,
detail
);
if
(
errno
>
0
&&
errno
<
sys_nerr
)
if
(
errno
>
0
&&
errno
<
sys_nerr
)
(
void
)
fprintf
(
stderr
,
" [%s]"
,
strerror
(
errno
));
fprintf
(
stderr
,
" [%s]"
,
strerror
(
errno
));
else
if
(
errno
!=
0
)
else
if
(
errno
!=
0
)
(
void
)
fprintf
(
stderr
,
" [Error %d]"
,
errno
);
fprintf
(
stderr
,
" [Error %d]"
,
errno
);
(
void
)
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
(
void
)
fflush
(
stderr
);
fflush
(
stderr
);
}
}
ExcProc
*
ExcProc
*
...
...
src/backend/utils/error/format.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.
2 1997/05/17 16:23:06 mergl
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/format.c,v 1.
3 1997/08/12 22:54:47 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -32,7 +32,7 @@ form(const char *fmt, ... )
...
@@ -32,7 +32,7 @@ form(const char *fmt, ... )
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
(
void
)
vsprintf
(
FormBuf
,
fmt
,
args
);
vsprintf
(
FormBuf
,
fmt
,
args
);
va_end
(
args
);
va_end
(
args
);
...
...
src/backend/utils/hash/dynahash.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.
6 1996/11/10 03:03:36
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.
7 1997/08/12 22:54:50
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -377,10 +377,10 @@ hash_destroy (HTAB *hashp)
...
@@ -377,10 +377,10 @@ hash_destroy (HTAB *hashp)
}
}
free
((
char
*
)
segp
);
free
((
char
*
)
segp
);
}
}
(
void
)
MEM_FREE
(
(
char
*
)
hashp
->
dir
);
MEM_FREE
(
(
char
*
)
hashp
->
dir
);
(
void
)
MEM_FREE
(
(
char
*
)
hashp
->
hctl
);
MEM_FREE
(
(
char
*
)
hashp
->
hctl
);
hash_stats
(
"destroy"
,
hashp
);
hash_stats
(
"destroy"
,
hashp
);
(
void
)
MEM_FREE
(
(
char
*
)
hashp
);
MEM_FREE
(
(
char
*
)
hashp
);
}
}
}
}
...
@@ -767,7 +767,7 @@ dir_realloc(HTAB *hashp)
...
@@ -767,7 +767,7 @@ dir_realloc(HTAB *hashp)
if
(
p
!=
NULL
)
{
if
(
p
!=
NULL
)
{
memmove
(
p
,
*
p_ptr
,
old_dirsize
);
memmove
(
p
,
*
p_ptr
,
old_dirsize
);
memset
(
*
p_ptr
+
old_dirsize
,
0
,
new_dirsize
-
old_dirsize
);
memset
(
*
p_ptr
+
old_dirsize
,
0
,
new_dirsize
-
old_dirsize
);
(
void
)
free
(
(
char
*
)
*
p_ptr
);
free
(
(
char
*
)
*
p_ptr
);
*
p_ptr
=
p
;
*
p_ptr
=
p
;
hashp
->
hctl
->
dsize
=
new_dirsize
;
hashp
->
hctl
->
dsize
=
new_dirsize
;
return
(
1
);
return
(
1
);
...
...
src/backend/utils/init/postinit.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.
9 1997/07/24 20:17:3
4 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.
10 1997/08/12 22:54:5
4 momjian Exp $
*
*
* NOTES
* NOTES
* InitPostgres() is the function called from PostgresMain
* InitPostgres() is the function called from PostgresMain
...
@@ -217,7 +217,7 @@ InitMyDatabaseId()
...
@@ -217,7 +217,7 @@ InitMyDatabaseId()
}
}
done:
done:
(
void
)
close
(
dbfd
);
close
(
dbfd
);
pfree
(
pg
);
pfree
(
pg
);
if
(
!
OidIsValid
(
MyDatabaseId
))
if
(
!
OidIsValid
(
MyDatabaseId
))
...
@@ -463,7 +463,7 @@ InitCommunication()
...
@@ -463,7 +463,7 @@ InitCommunication()
void
void
InitStdio
()
InitStdio
()
{
{
(
void
)
DebugFileOpen
();
DebugFileOpen
();
}
}
/* --------------------------------
/* --------------------------------
...
...
src/backend/utils/mmgr/portalmem.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.
3 1996/11/08 06:00
:57 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.
4 1997/08/12 22:54
:57 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -817,7 +817,7 @@ PortalResetHeapMemory(Portal portal)
...
@@ -817,7 +817,7 @@ PortalResetHeapMemory(Portal portal)
}
while
(
PointerIsValid
(
context
->
block
));
}
while
(
PointerIsValid
(
context
->
block
));
/* restore context */
/* restore context */
(
void
)
MemoryContextSwitchTo
(
currentContext
);
MemoryContextSwitchTo
(
currentContext
);
}
}
}
}
...
...
src/backend/utils/sort/lselect.c
View file @
ea5b5357
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.
4 1997/08/06 03:41:47
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/lselect.c,v 1.
5 1997/08/12 22:55:00
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -183,8 +183,6 @@ tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context)
...
@@ -183,8 +183,6 @@ tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context)
{
{
register
char
*
lattr
,
*
rattr
;
register
char
*
lattr
,
*
rattr
;
int
nkey
=
0
;
int
nkey
=
0
;
extern
int
Nkeys
;
extern
ScanKey
Key
;
int
result
=
0
;
int
result
=
0
;
bool
isnull
;
bool
isnull
;
...
...
src/backend/utils/sort/psort.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.1
2 1997/08/12 20:16:14
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.1
3 1997/08/12 22:55:02
momjian Exp $
*
*
* NOTES
* NOTES
* Sorts the first relation into the second relation.
* Sorts the first relation into the second relation.
...
@@ -35,6 +35,9 @@
...
@@ -35,6 +35,9 @@
*/
*/
#include <stdio.h>
#include <stdio.h>
#include <math.h>
#include <math.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "postgres.h"
#include "postgres.h"
...
@@ -342,9 +345,8 @@ bool
...
@@ -342,9 +345,8 @@ bool
createrun
(
Sort
*
node
,
FILE
*
file
,
bool
*
empty
)
createrun
(
Sort
*
node
,
FILE
*
file
,
bool
*
empty
)
{
{
register
HeapTuple
lasttuple
;
register
HeapTuple
lasttuple
;
register
HeapTuple
btup
,
tup
;
register
HeapTuple
tup
;
struct
leftist
*
nextrun
;
struct
leftist
*
nextrun
;
Buffer
b
;
bool
foundeor
;
bool
foundeor
;
short
junk
;
short
junk
;
...
@@ -726,7 +728,6 @@ struct tapelst {
...
@@ -726,7 +728,6 @@ struct tapelst {
};
};
static
struct
tapelst
*
Tapes
=
NULL
;
static
struct
tapelst
*
Tapes
=
NULL
;
static
char
Tempfile
[
MAXPGPATH
]
=
TEMPDIR
;
/*
/*
* gettape - returns an open stream for writing/reading
* gettape - returns an open stream for writing/reading
...
...
src/lextest/lextest.c
View file @
ea5b5357
...
@@ -10,7 +10,7 @@ int main()
...
@@ -10,7 +10,7 @@ int main()
return
0
;
return
0
;
}
}
yywrap
()
int
yywrap
()
{
{
return
1
;
return
1
;
};
};
src/test/examples/testlo.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.
2 1997/07/10 01:15:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.
3 1997/08/12 22:55:19
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -63,8 +63,8 @@ Oid importFile(PGconn *conn, char *filename)
...
@@ -63,8 +63,8 @@ Oid importFile(PGconn *conn, char *filename)
}
}
}
}
(
void
)
close
(
fd
);
close
(
fd
);
(
void
)
lo_close
(
conn
,
lobj_fd
);
lo_close
(
conn
,
lobj_fd
);
return
lobjId
;
return
lobjId
;
}
}
...
@@ -168,8 +168,8 @@ void exportFile(PGconn *conn, Oid lobjId, char *filename)
...
@@ -168,8 +168,8 @@ void exportFile(PGconn *conn, Oid lobjId, char *filename)
}
}
}
}
(
void
)
lo_close
(
conn
,
lobj_fd
);
lo_close
(
conn
,
lobj_fd
);
(
void
)
close
(
fd
);
close
(
fd
);
return
;
return
;
}
}
...
...
src/test/examples/testlo2.c
View file @
ea5b5357
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.
1.1.1 1996/07/09 06:22:23 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.
2 1997/08/12 22:55:21 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -57,8 +57,8 @@ Oid importFile(PGconn *conn, char *filename)
...
@@ -57,8 +57,8 @@ Oid importFile(PGconn *conn, char *filename)
}
}
}
}
(
void
)
close
(
fd
);
close
(
fd
);
(
void
)
lo_close
(
conn
,
lobj_fd
);
lo_close
(
conn
,
lobj_fd
);
return
lobjId
;
return
lobjId
;
}
}
...
@@ -162,8 +162,8 @@ void exportFile(PGconn *conn, Oid lobjId, char *filename)
...
@@ -162,8 +162,8 @@ void exportFile(PGconn *conn, Oid lobjId, char *filename)
}
}
}
}
(
void
)
lo_close
(
conn
,
lobj_fd
);
lo_close
(
conn
,
lobj_fd
);
(
void
)
close
(
fd
);
close
(
fd
);
return
;
return
;
}
}
...
...
src/test/regress/regress.c
View file @
ea5b5357
/*
/*
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.
7 1997/07/29 16:21:12 thomas
Exp $
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.
8 1997/08/12 22:55:25 momjian
Exp $
*/
*/
#include <float.h>
/* faked on sunos */
#include <float.h>
/* faked on sunos */
...
@@ -229,7 +229,7 @@ widget_out(widget)
...
@@ -229,7 +229,7 @@ widget_out(widget)
return
(
NULL
);
return
(
NULL
);
result
=
(
char
*
)
palloc
(
60
);
result
=
(
char
*
)
palloc
(
60
);
(
void
)
sprintf
(
result
,
"(%g,%g,%g)"
,
sprintf
(
result
,
"(%g,%g,%g)"
,
widget
->
center
.
x
,
widget
->
center
.
y
,
widget
->
radius
);
widget
->
center
.
x
,
widget
->
center
.
y
,
widget
->
radius
);
return
(
result
);
return
(
result
);
}
}
...
...
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