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
f36b2560
Commit
f36b2560
authored
Oct 23, 1996
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Major code cleanups from D'arcy (-Wall -Werror)
parent
29a0fb84
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
249 additions
and
147 deletions
+249
-147
src/backend/access/gist/gist.c
src/backend/access/gist/gist.c
+8
-0
src/backend/access/gist/giststrat.c
src/backend/access/gist/giststrat.c
+1
-1
src/backend/access/hash/hash.c
src/backend/access/hash/hash.c
+9
-1
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashovfl.c
+5
-5
src/backend/access/index/istrat.c
src/backend/access/index/istrat.c
+3
-3
src/backend/access/nbtree/nbtcompare.c
src/backend/access/nbtree/nbtcompare.c
+4
-2
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtinsert.c
+5
-3
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtpage.c
+4
-4
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtree.c
+17
-4
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtscan.c
+2
-1
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsearch.c
+12
-16
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtsort.c
+6
-5
src/backend/access/nbtree/nbtutils.c
src/backend/access/nbtree/nbtutils.c
+8
-3
src/backend/access/rtree/rtget.c
src/backend/access/rtree/rtget.c
+7
-2
src/backend/access/rtree/rtproc.c
src/backend/access/rtree/rtproc.c
+4
-2
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtree.c
+16
-4
src/backend/access/rtree/rtscan.c
src/backend/access/rtree/rtscan.c
+8
-2
src/backend/access/transam/transsup.c
src/backend/access/transam/transsup.c
+2
-2
src/backend/bootstrap/bootscanner.l
src/backend/bootstrap/bootscanner.l
+9
-5
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+11
-8
src/backend/commands/copy.c
src/backend/commands/copy.c
+17
-12
src/backend/commands/defind.c
src/backend/commands/defind.c
+1
-4
src/backend/commands/define.c
src/backend/commands/define.c
+5
-10
src/backend/commands/explain.c
src/backend/commands/explain.c
+4
-1
src/backend/commands/remove.c
src/backend/commands/remove.c
+2
-2
src/backend/commands/vacuum.c
src/backend/commands/vacuum.c
+5
-4
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+3
-1
src/backend/include/miscadmin.h
src/backend/include/miscadmin.h
+1
-11
src/backend/port/BSD44_derived/dl.c
src/backend/port/BSD44_derived/dl.c
+4
-2
src/backend/port/BSD44_derived/port-protos.h
src/backend/port/BSD44_derived/port-protos.h
+7
-1
src/backend/utils/cache/relcache.c
src/backend/utils/cache/relcache.c
+15
-9
src/include/access/gist.h
src/include/access/gist.h
+5
-1
src/include/access/iqual.h
src/include/access/iqual.h
+2
-1
src/include/access/nbtree.h
src/include/access/nbtree.h
+5
-1
src/include/access/relscan.h
src/include/access/relscan.h
+2
-4
src/include/access/transam.h
src/include/access/transam.h
+5
-1
src/include/executor/nodeIndexscan.h
src/include/executor/nodeIndexscan.h
+2
-1
src/include/executor/tuptable.h
src/include/executor/tuptable.h
+4
-1
src/include/libpq/libpq.h
src/include/libpq/libpq.h
+5
-1
src/include/libpq/pqcomm.h
src/include/libpq/pqcomm.h
+3
-1
src/include/nodes/execnodes.h
src/include/nodes/execnodes.h
+2
-1
src/include/nodes/primnodes.h
src/include/nodes/primnodes.h
+5
-1
src/include/storage/bufpage.h
src/include/storage/bufpage.h
+2
-2
src/include/utils/tqual.h
src/include/utils/tqual.h
+2
-1
No files found.
src/backend/access/gist/gist.c
View file @
f36b2560
...
@@ -145,9 +145,11 @@ gistbuild(Relation heap,
...
@@ -145,9 +145,11 @@ gistbuild(Relation heap,
Datum
*
d
;
Datum
*
d
;
bool
*
nulls
;
bool
*
nulls
;
int
nb
,
nh
,
ni
;
int
nb
,
nh
,
ni
;
#ifndef OMIT_PARTIAL_INDEX
ExprContext
*
econtext
;
ExprContext
*
econtext
;
TupleTable
tupleTable
;
TupleTable
tupleTable
;
TupleTableSlot
*
slot
;
TupleTableSlot
*
slot
;
#endif
Oid
hrelid
,
irelid
;
Oid
hrelid
,
irelid
;
Node
*
pred
,
*
oldPred
;
Node
*
pred
,
*
oldPred
;
GISTSTATE
giststate
;
GISTSTATE
giststate
;
...
@@ -199,6 +201,12 @@ gistbuild(Relation heap,
...
@@ -199,6 +201,12 @@ gistbuild(Relation heap,
econtext
=
makeNode
(
ExprContext
);
econtext
=
makeNode
(
ExprContext
);
FillDummyExprContext
(
econtext
,
slot
,
hd
,
buffer
);
FillDummyExprContext
(
econtext
,
slot
,
hd
,
buffer
);
}
}
else
/* shut the compiler up */
{
tupleTable
=
NULL
;
slot
=
NULL
;
econtext
=
NULL
;
}
#endif
/* OMIT_PARTIAL_INDEX */
#endif
/* OMIT_PARTIAL_INDEX */
scan
=
heap_beginscan
(
heap
,
0
,
NowTimeQual
,
0
,
(
ScanKey
)
NULL
);
scan
=
heap_beginscan
(
heap
,
0
,
NowTimeQual
,
0
,
(
ScanKey
)
NULL
);
htup
=
heap_getnext
(
scan
,
0
,
&
buffer
);
htup
=
heap_getnext
(
scan
,
0
,
&
buffer
);
...
...
src/backend/access/gist/giststrat.c
View file @
f36b2560
...
@@ -113,7 +113,7 @@ static StrategyEvaluationData GISTEvaluationData = {
...
@@ -113,7 +113,7 @@ static StrategyEvaluationData GISTEvaluationData = {
(
StrategyTransformMap
)
GISTNegate
,
/* how to do (not qual) */
(
StrategyTransformMap
)
GISTNegate
,
/* how to do (not qual) */
(
StrategyTransformMap
)
GISTCommute
,
/* how to swap operands */
(
StrategyTransformMap
)
GISTCommute
,
/* how to swap operands */
(
StrategyTransformMap
)
GISTNegateCommute
,
/* how to do both */
(
StrategyTransformMap
)
GISTNegateCommute
,
/* how to do both */
NULL
{
NULL
}
};
};
StrategyNumber
StrategyNumber
...
...
src/backend/access/hash/hash.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.
5 1996/10/21 05:45:11
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.
6 1996/10/23 07:38:29
scrappy Exp $
*
*
* NOTES
* NOTES
* This file contains only the public interface routines.
* This file contains only the public interface routines.
...
@@ -113,9 +113,11 @@ hashbuild(Relation heap,
...
@@ -113,9 +113,11 @@ hashbuild(Relation heap,
int
nhtups
,
nitups
;
int
nhtups
,
nitups
;
int
i
;
int
i
;
HashItem
hitem
;
HashItem
hitem
;
#ifndef OMIT_PARTIAL_INDEX
ExprContext
*
econtext
;
ExprContext
*
econtext
;
TupleTable
tupleTable
;
TupleTable
tupleTable
;
TupleTableSlot
*
slot
;
TupleTableSlot
*
slot
;
#endif
Oid
hrelid
,
irelid
;
Oid
hrelid
,
irelid
;
Node
*
pred
,
*
oldPred
;
Node
*
pred
,
*
oldPred
;
...
@@ -151,6 +153,12 @@ hashbuild(Relation heap,
...
@@ -151,6 +153,12 @@ hashbuild(Relation heap,
econtext
=
makeNode
(
ExprContext
);
econtext
=
makeNode
(
ExprContext
);
FillDummyExprContext
(
econtext
,
slot
,
htupdesc
,
buffer
);
FillDummyExprContext
(
econtext
,
slot
,
htupdesc
,
buffer
);
}
}
else
/* quiet the compiler */
{
econtext
=
NULL
;
tupleTable
=
0
;
slot
=
0
;
}
#endif
/* OMIT_PARTIAL_INDEX */
#endif
/* OMIT_PARTIAL_INDEX */
/* start a heap scan */
/* start a heap scan */
...
...
src/backend/access/hash/hashovfl.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.
4 1996/10/21 05:45:14
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.
5 1996/10/23 07:38:32
scrappy Exp $
*
*
* NOTES
* NOTES
* Overflow pages look like ordinary relation pages.
* Overflow pages look like ordinary relation pages.
...
@@ -132,12 +132,12 @@ static OverflowPageAddress
...
@@ -132,12 +132,12 @@ static OverflowPageAddress
_hash_getovfladdr
(
Relation
rel
,
Buffer
*
metabufp
)
_hash_getovfladdr
(
Relation
rel
,
Buffer
*
metabufp
)
{
{
HashMetaPage
metap
;
HashMetaPage
metap
;
Buffer
mapbuf
;
Buffer
mapbuf
=
0
;
BlockNumber
blkno
;
BlockNumber
blkno
;
PageOffset
offset
;
PageOffset
offset
;
OverflowPageAddress
oaddr
;
OverflowPageAddress
oaddr
;
SplitNumber
splitnum
;
SplitNumber
splitnum
;
uint32
*
freep
;
uint32
*
freep
=
NULL
;
uint32
max_free
;
uint32
max_free
;
uint32
bit
;
uint32
bit
;
uint32
first_page
;
uint32
first_page
;
...
@@ -356,7 +356,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
...
@@ -356,7 +356,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
* XXX this should look like:
* XXX this should look like:
* - lock prev/next
* - lock prev/next
* - modify/write prev/next (how to do write ordering with a
* - modify/write prev/next (how to do write ordering with a
* doubly-linked list?
??
)
* doubly-linked list?)
* - unlock prev/next
* - unlock prev/next
*/
*/
if
(
BlockNumberIsValid
(
prevblkno
))
{
if
(
BlockNumberIsValid
(
prevblkno
))
{
...
@@ -503,7 +503,7 @@ _hash_squeezebucket(Relation rel,
...
@@ -503,7 +503,7 @@ _hash_squeezebucket(Relation rel,
Bucket
bucket
)
Bucket
bucket
)
{
{
Buffer
wbuf
;
Buffer
wbuf
;
Buffer
rbuf
;
Buffer
rbuf
=
0
;
BlockNumber
wblkno
;
BlockNumber
wblkno
;
BlockNumber
rblkno
;
BlockNumber
rblkno
;
Page
wpage
;
Page
wpage
;
...
...
src/backend/access/index/istrat.c
View file @
f36b2560
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.
3 1996/10/21 07:38:20
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.
4 1996/10/23 07:38:43
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -233,8 +233,8 @@ StrategyTermEvaluate(StrategyTerm term,
...
@@ -233,8 +233,8 @@ StrategyTermEvaluate(StrategyTerm term,
Datum
right
)
Datum
right
)
{
{
Index
index
;
Index
index
;
long
tmpres
;
long
tmpres
=
0
;
bool
result
;
bool
result
=
0
;
StrategyOperator
operator
;
StrategyOperator
operator
;
ScanKey
entry
;
ScanKey
entry
;
...
...
src/backend/access/nbtree/nbtcompare.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.
2 1996/10/20 10:53:02
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.
3 1996/10/23 07:38:54
scrappy Exp $
*
*
* NOTES
* NOTES
* These functions are stored in pg_amproc. For each operator class
* These functions are stored in pg_amproc. For each operator class
...
@@ -20,8 +20,10 @@
...
@@ -20,8 +20,10 @@
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include
"postgres.h"
#include
<string.h>
#include <time.h>
#include <time.h>
#include "postgres.h"
#include "utils/nabstime.h"
#include "utils/nabstime.h"
int32
int32
...
...
src/backend/access/nbtree/nbtinsert.c
View file @
f36b2560
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.
2 1996/10/20 10:53:03
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.
3 1996/10/23 07:39:00
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -37,15 +40,14 @@
...
@@ -37,15 +40,14 @@
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/item.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "utils/palloc.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
...
...
src/backend/access/nbtree/nbtpage.c
View file @
f36b2560
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.
2 1996/10/20 10:53:06
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.
3 1996/10/23 07:39:04
scrappy Exp $
*
*
* NOTES
* NOTES
* Postgres btree pages look like ordinary relation pages. The opaque
* Postgres btree pages look like ordinary relation pages. The opaque
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
...
@@ -36,7 +38,6 @@
...
@@ -36,7 +38,6 @@
#include "utils/rel.h"
#include "utils/rel.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/block.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemptr.h"
...
@@ -45,7 +46,6 @@
...
@@ -45,7 +46,6 @@
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/item.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#define BTREE_METAPAGE 0
#define BTREE_METAPAGE 0
#define BTREE_MAGIC 0x053162
#define BTREE_MAGIC 0x053162
...
...
src/backend/access/nbtree/nbtree.c
View file @
f36b2560
...
@@ -8,13 +8,15 @@
...
@@ -8,13 +8,15 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.
4 1996/10/20 10:53:08
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.
5 1996/10/23 07:39:06
scrappy Exp $
*
*
* NOTES
* NOTES
* This file contains only the public interface routines.
* This file contains only the public interface routines.
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
...
@@ -25,6 +27,7 @@
...
@@ -25,6 +27,7 @@
#include "storage/fd.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "catalog/pg_class.h"
#include "catalog/index.h"
#include "nodes/nodes.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/skey.h"
...
@@ -40,10 +43,11 @@
...
@@ -40,10 +43,11 @@
#include "storage/item.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include
<time.h>
#include
"storage/bufmgr.h"
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
...
@@ -59,7 +63,6 @@
...
@@ -59,7 +63,6 @@
#include "nodes/parsenodes.h"
#include "nodes/parsenodes.h"
#include "tcop/dest.h"
#include "tcop/dest.h"
#include "executor/execdesc.h"
#include "executor/execdesc.h"
#include <stdio.h>
#include "catalog/pg_index.h"
#include "catalog/pg_index.h"
#include "executor/executor.h"
#include "executor/executor.h"
...
@@ -96,13 +99,15 @@ btbuild(Relation heap,
...
@@ -96,13 +99,15 @@ btbuild(Relation heap,
TupleDesc
htupdesc
,
itupdesc
;
TupleDesc
htupdesc
,
itupdesc
;
Datum
*
attdata
;
Datum
*
attdata
;
bool
*
nulls
;
bool
*
nulls
;
InsertIndexResult
res
;
InsertIndexResult
res
=
0
;
int
nhtups
,
nitups
;
int
nhtups
,
nitups
;
int
i
;
int
i
;
BTItem
btitem
;
BTItem
btitem
;
#ifndef OMIT_PARTIAL_INDEX
ExprContext
*
econtext
;
ExprContext
*
econtext
;
TupleTable
tupleTable
;
TupleTable
tupleTable
;
TupleTableSlot
*
slot
;
TupleTableSlot
*
slot
;
#endif
Oid
hrelid
,
irelid
;
Oid
hrelid
,
irelid
;
Node
*
pred
,
*
oldPred
;
Node
*
pred
,
*
oldPred
;
void
*
spool
;
void
*
spool
;
...
@@ -139,6 +144,12 @@ btbuild(Relation heap,
...
@@ -139,6 +144,12 @@ btbuild(Relation heap,
econtext
=
makeNode
(
ExprContext
);
econtext
=
makeNode
(
ExprContext
);
FillDummyExprContext
(
econtext
,
slot
,
htupdesc
,
InvalidBuffer
);
FillDummyExprContext
(
econtext
,
slot
,
htupdesc
,
InvalidBuffer
);
}
}
else
{
econtext
=
NULL
;
tupleTable
=
NULL
;
slot
=
NULL
;
}
#endif
/* OMIT_PARTIAL_INDEX */
#endif
/* OMIT_PARTIAL_INDEX */
/* start a heap scan */
/* start a heap scan */
...
@@ -152,6 +163,8 @@ btbuild(Relation heap,
...
@@ -152,6 +163,8 @@ btbuild(Relation heap,
spool
=
_bt_spoolinit
(
index
,
7
);
spool
=
_bt_spoolinit
(
index
,
7
);
res
=
(
InsertIndexResult
)
NULL
;
res
=
(
InsertIndexResult
)
NULL
;
}
}
else
spool
=
NULL
;
for
(;
HeapTupleIsValid
(
htup
);
htup
=
heap_getnext
(
hscan
,
0
,
&
buffer
))
{
for
(;
HeapTupleIsValid
(
htup
);
htup
=
heap_getnext
(
hscan
,
0
,
&
buffer
))
{
...
...
src/backend/access/nbtree/nbtscan.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.
2 1996/10/20 10:53:10
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.
3 1996/10/23 07:39:08
scrappy Exp $
*
*
*
*
* NOTES
* NOTES
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
...
...
src/backend/access/nbtree/nbtsearch.c
View file @
f36b2560
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.
3 1996/10/20 10:53:11
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.
4 1996/10/23 07:39:10
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -36,13 +38,17 @@
...
@@ -36,13 +38,17 @@
#include "storage/item.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include
<time.h>
#include
"storage/bufmgr.h"
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
#include "access/genam.h"
#include "fmgr.h"
static
BTStack
_bt_searchr
(
Relation
rel
,
int
keysz
,
ScanKey
scankey
,
Buffer
*
bufP
,
BTStack
stack_in
);
static
BTStack
_bt_searchr
(
Relation
rel
,
int
keysz
,
ScanKey
scankey
,
Buffer
*
bufP
,
BTStack
stack_in
);
static
OffsetNumber
_bt_firsteq
(
Relation
rel
,
TupleDesc
itupdesc
,
Page
page
,
Size
keysz
,
ScanKey
scankey
,
OffsetNumber
offnum
);
static
OffsetNumber
_bt_firsteq
(
Relation
rel
,
TupleDesc
itupdesc
,
Page
page
,
Size
keysz
,
ScanKey
scankey
,
OffsetNumber
offnum
);
...
@@ -296,14 +302,13 @@ _bt_binsrch(Relation rel,
...
@@ -296,14 +302,13 @@ _bt_binsrch(Relation rel,
Page
page
;
Page
page
;
BTPageOpaque
opaque
;
BTPageOpaque
opaque
;
OffsetNumber
low
,
mid
,
high
;
OffsetNumber
low
,
mid
,
high
;
bool
match
;
int
result
;
int
result
;
page
=
BufferGetPage
(
buf
);
page
=
BufferGetPage
(
buf
);
opaque
=
(
BTPageOpaque
)
PageGetSpecialPointer
(
page
);
opaque
=
(
BTPageOpaque
)
PageGetSpecialPointer
(
page
);
/* by convention, item 0 on any non-rightmost page is the high key */
/* by convention, item 0 on any non-rightmost page is the high key */
low
=
P_RIGHTMOST
(
opaque
)
?
P_HIKEY
:
P_FIRSTKEY
;
low
=
mid
=
P_RIGHTMOST
(
opaque
)
?
P_HIKEY
:
P_FIRSTKEY
;
high
=
PageGetMaxOffsetNumber
(
page
);
high
=
PageGetMaxOffsetNumber
(
page
);
...
@@ -320,7 +325,6 @@ _bt_binsrch(Relation rel,
...
@@ -320,7 +325,6 @@ _bt_binsrch(Relation rel,
return
(
low
);
return
(
low
);
itupdesc
=
RelationGetTupleDescriptor
(
rel
);
itupdesc
=
RelationGetTupleDescriptor
(
rel
);
match
=
false
;
while
((
high
-
low
)
>
1
)
{
while
((
high
-
low
)
>
1
)
{
mid
=
low
+
((
high
-
low
)
/
2
);
mid
=
low
+
((
high
-
low
)
/
2
);
...
@@ -330,16 +334,9 @@ _bt_binsrch(Relation rel,
...
@@ -330,16 +334,9 @@ _bt_binsrch(Relation rel,
low
=
mid
;
low
=
mid
;
else
if
(
result
<
0
)
else
if
(
result
<
0
)
high
=
mid
-
1
;
high
=
mid
-
1
;
else
{
else
match
=
true
;
break
;
}
}
/* if we found a match, we want to find the first one on the page */
if
(
match
)
{
return
(
_bt_firsteq
(
rel
,
itupdesc
,
page
,
keysz
,
scankey
,
mid
));
return
(
_bt_firsteq
(
rel
,
itupdesc
,
page
,
keysz
,
scankey
,
mid
));
}
else
{
}
/*
/*
* We terminated because the endpoints got too close together. There
* We terminated because the endpoints got too close together. There
...
@@ -387,7 +384,6 @@ _bt_binsrch(Relation rel,
...
@@ -387,7 +384,6 @@ _bt_binsrch(Relation rel,
return
(
OffsetNumberNext
(
high
));
return
(
OffsetNumberNext
(
high
));
}
}
}
}
}
}
}
static
OffsetNumber
static
OffsetNumber
...
@@ -1039,7 +1035,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
...
@@ -1039,7 +1035,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
ItemPointer
current
;
ItemPointer
current
;
ItemPointer
iptr
;
ItemPointer
iptr
;
OffsetNumber
offnum
,
maxoff
;
OffsetNumber
offnum
,
maxoff
;
OffsetNumber
start
;
OffsetNumber
start
=
0
;
BlockNumber
blkno
;
BlockNumber
blkno
;
BTItem
btitem
;
BTItem
btitem
;
IndexTuple
itup
;
IndexTuple
itup
;
...
...
src/backend/access/nbtree/nbtsort.c
View file @
f36b2560
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: nbtsort.c,v 1.
4 1996/10/20 10:53:13
scrappy Exp $
* $Id: nbtsort.c,v 1.
5 1996/10/23 07:39:11
scrappy Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -47,6 +47,10 @@
...
@@ -47,6 +47,10 @@
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -71,17 +75,14 @@
...
@@ -71,17 +75,14 @@
#include "storage/item.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
#include <stdio.h>
#include <fcntl.h>
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
...
...
src/backend/access/nbtree/nbtutils.c
View file @
f36b2560
...
@@ -7,11 +7,13 @@
...
@@ -7,11 +7,13 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.
3 1996/10/20 10:53:18
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.
4 1996/10/23 07:39:15
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -36,15 +38,18 @@
...
@@ -36,15 +38,18 @@
#include "storage/item.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/nbtree.h"
#include "access/nbtree.h"
#include "access/istrat.h"
#include "access/istrat.h"
#include "access/genam.h"
#include "access/iqual.h"
#include "fmgr.h"
ScanKey
ScanKey
_bt_mkscankey
(
Relation
rel
,
IndexTuple
itup
)
_bt_mkscankey
(
Relation
rel
,
IndexTuple
itup
)
...
...
src/backend/access/rtree/rtget.c
View file @
f36b2560
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.
2 1996/10/20 09:27:04
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.
3 1996/10/23 07:39:20
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -32,16 +35,18 @@
...
@@ -32,16 +35,18 @@
#include "storage/block.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemptr.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/iqual.h"
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/item.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include "storage/bufmgr.h"
#include "access/itup.h"
#include "access/itup.h"
...
...
src/backend/access/rtree/rtproc.c
View file @
f36b2560
...
@@ -7,15 +7,17 @@
...
@@ -7,15 +7,17 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.
2 1996/10/20 09:27:06
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.
3 1996/10/23 07:39:23
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include "postgres.h"
#include "postgres.h"
#include "utils/geo-decls.h"
#include "utils/geo-decls.h"
#include "utils/palloc.h"
BOX
BOX
*
rt_box_union
(
BOX
*
a
,
BOX
*
b
)
*
rt_box_union
(
BOX
*
a
,
BOX
*
b
)
...
...
src/backend/access/rtree/rtree.c
View file @
f36b2560
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.
4 1996/10/20 09:27:07
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.
5 1996/10/23 07:39:24
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -21,6 +24,7 @@
...
@@ -21,6 +24,7 @@
#include "storage/fd.h"
#include "storage/fd.h"
#include "catalog/pg_am.h"
#include "catalog/pg_am.h"
#include "catalog/pg_class.h"
#include "catalog/pg_class.h"
#include "catalog/index.h"
#include "nodes/nodes.h"
#include "nodes/nodes.h"
#include "rewrite/prs2lock.h"
#include "rewrite/prs2lock.h"
#include "access/skey.h"
#include "access/skey.h"
...
@@ -30,22 +34,23 @@
...
@@ -30,22 +34,23 @@
#include "storage/block.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemptr.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "access/itup.h"
#include "access/itup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/palloc.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/rtscan.h"
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/item.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include "storage/lmgr.h"
#include "access/rtree.h"
#include "access/rtree.h"
#include "access/funcindex.h"
#include "access/funcindex.h"
#include "nodes/params.h"
#include "nodes/params.h"
...
@@ -56,7 +61,6 @@
...
@@ -56,7 +61,6 @@
#include "executor/tuptable.h"
#include "executor/tuptable.h"
#include "nodes/execnodes.h"
#include "nodes/execnodes.h"
#include <stdio.h>
#include "storage/ipc.h"
#include "storage/ipc.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
...
@@ -126,9 +130,11 @@ rtbuild(Relation heap,
...
@@ -126,9 +130,11 @@ rtbuild(Relation heap,
Datum
*
d
;
Datum
*
d
;
bool
*
nulls
;
bool
*
nulls
;
int
nb
,
nh
,
ni
;
int
nb
,
nh
,
ni
;
#ifndef OMIT_PARTIAL_INDEX
ExprContext
*
econtext
;
ExprContext
*
econtext
;
TupleTable
tupleTable
;
TupleTable
tupleTable
;
TupleTableSlot
*
slot
;
TupleTableSlot
*
slot
;
#endif
Oid
hrelid
,
irelid
;
Oid
hrelid
,
irelid
;
Node
*
pred
,
*
oldPred
;
Node
*
pred
,
*
oldPred
;
RTSTATE
rtState
;
RTSTATE
rtState
;
...
@@ -176,6 +182,12 @@ rtbuild(Relation heap,
...
@@ -176,6 +182,12 @@ rtbuild(Relation heap,
econtext
=
makeNode
(
ExprContext
);
econtext
=
makeNode
(
ExprContext
);
FillDummyExprContext
(
econtext
,
slot
,
hd
,
buffer
);
FillDummyExprContext
(
econtext
,
slot
,
hd
,
buffer
);
}
}
else
{
econtext
=
NULL
;
tupleTable
=
NULL
;
slot
=
NULL
;
}
#endif
/* OMIT_PARTIAL_INDEX */
#endif
/* OMIT_PARTIAL_INDEX */
scan
=
heap_beginscan
(
heap
,
0
,
NowTimeQual
,
0
,
(
ScanKey
)
NULL
);
scan
=
heap_beginscan
(
heap
,
0
,
NowTimeQual
,
0
,
(
ScanKey
)
NULL
);
htup
=
heap_getnext
(
scan
,
0
,
&
buffer
);
htup
=
heap_getnext
(
scan
,
0
,
&
buffer
);
...
...
src/backend/access/rtree/rtscan.c
View file @
f36b2560
...
@@ -7,11 +7,14 @@
...
@@ -7,11 +7,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.
4 1996/10/20 09:27:10
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.
5 1996/10/23 07:39:26
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "catalog/pg_attribute.h"
#include "catalog/pg_attribute.h"
...
@@ -30,14 +33,17 @@
...
@@ -30,14 +33,17 @@
#include "storage/block.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemptr.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "utils/palloc.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/lmgr.h"
#include "storage/bufmgr.h"
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/rtree.h"
#include "access/rtree.h"
#include "access/rtstrat.h"
#include "access/itup.h"
#include "access/itup.h"
#include "access/funcindex.h"
#include "access/funcindex.h"
...
...
src/backend/access/transam/transsup.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.
3 1996/10/21 07:15:06
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.
4 1996/10/23 07:39:32
scrappy Exp $
*
*
* NOTES
* NOTES
* This file contains support functions for the high
* This file contains support functions for the high
...
@@ -78,7 +78,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
...
@@ -78,7 +78,7 @@ TransComputeBlockNumber(Relation relation, /* relation to test */
TransactionId
transactionId
,
/* transaction id to test */
TransactionId
transactionId
,
/* transaction id to test */
BlockNumber
*
blockNumberOutP
)
BlockNumber
*
blockNumberOutP
)
{
{
long
itemsPerBlock
;
long
itemsPerBlock
=
0
;
/* ----------------
/* ----------------
* we calculate the block number of our transaction
* we calculate the block number of our transaction
...
...
src/backend/bootstrap/bootscanner.l
View file @
f36b2560
...
@@ -8,10 +8,12 @@
...
@@ -8,10 +8,12 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.
3 1996/10/21 08:31:21
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.
4 1996/10/23 07:39:39
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <time.h>
#include "postgres.h"
#include "postgres.h"
#include "storage/block.h"
#include "storage/block.h"
...
@@ -34,7 +36,6 @@
...
@@ -34,7 +36,6 @@
#include "bootstrap/bootstrap.h"
#include "bootstrap/bootstrap.h"
#include "nodes/primnodes.h"
#include "nodes/primnodes.h"
#include <time.h>
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
#include "access/htup.h"
#include "utils/tqual.h"
#include "utils/tqual.h"
...
@@ -44,6 +45,8 @@
...
@@ -44,6 +45,8 @@
#include "bootstrap_tokens.h"
#include "bootstrap_tokens.h"
#define YY_NO_UNPUT
/* some versions of lex define this as a macro */
/* some versions of lex define this as a macro */
#if defined(yywrap)
#if defined(yywrap)
#undef yywrap
#undef yywrap
...
@@ -121,13 +124,14 @@ insert { return(INSERT_TUPLE); }
...
@@ -121,13 +124,14 @@ insert { return(INSERT_TUPLE); }
%%
%%
yywrap()
int
yywrap(void)
{
{
return 1;
return 1;
}
}
yyerror(str)
void
char *str;
yyerror(const char *str)
{
{
fprintf(stderr,"\tsyntax error %d : %s",yyline, str);
fprintf(stderr,"\tsyntax error %d : %s",yyline, str);
}
}
src/backend/bootstrap/bootstrap.c
View file @
f36b2560
...
@@ -7,10 +7,15 @@
...
@@ -7,10 +7,15 @@
* 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.
8 1996/10/21 08:31:23
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.
9 1996/10/23 07:39:42
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <time.h>
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
#define BOOTSTRAP_INCLUDE
/* mask out stuff in tcop/tcopprot.h */
#define BOOTSTRAP_INCLUDE
/* mask out stuff in tcop/tcopprot.h */
#include "postgres.h"
#include "postgres.h"
...
@@ -28,7 +33,6 @@
...
@@ -28,7 +33,6 @@
#include "access/strat.h"
#include "access/strat.h"
#include "utils/rel.h"
#include "utils/rel.h"
#include <time.h>
#include "storage/block.h"
#include "storage/block.h"
#include "storage/off.h"
#include "storage/off.h"
#include "storage/itemptr.h"
#include "storage/itemptr.h"
...
@@ -45,10 +49,6 @@
...
@@ -45,10 +49,6 @@
#include "nodes/memnodes.h"
#include "nodes/memnodes.h"
#include <stdio.h>
#include <signal.h>
#include <setjmp.h>
#include "miscadmin.h"
#include "miscadmin.h"
#include "catalog/pg_type.h"
#include "catalog/pg_type.h"
...
@@ -101,6 +101,8 @@
...
@@ -101,6 +101,8 @@
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
#define ALLOC(t, c) (t *)calloc((unsigned)(c), sizeof(t))
#define FIRST_TYPE_OID 16
/* OID of the first type */
#define FIRST_TYPE_OID 16
/* OID of the first type */
extern
int
Int_yyparse
(
void
);
/* ----------------
/* ----------------
* global variables
* global variables
* ----------------
* ----------------
...
@@ -235,7 +237,8 @@ typedef void (*sig_func)();
...
@@ -235,7 +237,8 @@ typedef void (*sig_func)();
* error handling / abort routines
* error handling / abort routines
* ----------------
* ----------------
*/
*/
void
err_out
()
void
err_out
(
void
)
{
{
Warnings
++
;
Warnings
++
;
cleanup
();
cleanup
();
...
@@ -245,7 +248,7 @@ void err_out()
...
@@ -245,7 +248,7 @@ void err_out()
usage help for the bootstrap backen
usage help for the bootstrap backen
*/
*/
static
void
static
void
usage
()
usage
(
void
)
{
{
fprintf
(
stderr
,
"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] "
);
fprintf
(
stderr
,
"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] "
);
fprintf
(
stderr
,
"[-P portno] [dbName]
\n
"
);
fprintf
(
stderr
,
"[-P portno] [dbName]
\n
"
);
...
...
src/backend/commands/copy.c
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.
9 1996/10/21 09:37:26
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.
10 1996/10/23 07:39:53
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -177,7 +177,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
...
@@ -177,7 +177,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
Oid
*
elements
;
Oid
*
elements
;
Datum
value
;
Datum
value
;
bool
isnull
=
(
bool
)
true
;
bool
isnull
=
(
bool
)
true
;
char
*
nulls
;
char
*
nulls
=
NULL
;
char
*
string
;
char
*
string
;
int32
ntuples
;
int32
ntuples
;
TupleDesc
tupDesc
;
TupleDesc
tupDesc
;
...
@@ -189,8 +189,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
...
@@ -189,8 +189,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
tupDesc
=
rel
->
rd_att
;
tupDesc
=
rel
->
rd_att
;
if
(
!
binary
)
{
if
(
!
binary
)
{
out_functions
=
(
func_ptr
*
)
out_functions
=
(
func_ptr
*
)
palloc
(
attr_count
*
sizeof
(
func_ptr
));
palloc
(
attr_count
*
sizeof
(
func_ptr
));
elements
=
(
Oid
*
)
palloc
(
attr_count
*
sizeof
(
Oid
));
elements
=
(
Oid
*
)
palloc
(
attr_count
*
sizeof
(
Oid
));
for
(
i
=
0
;
i
<
attr_count
;
i
++
)
{
for
(
i
=
0
;
i
<
attr_count
;
i
++
)
{
out_func_oid
=
(
Oid
)
GetOutputFunction
(
attr
[
i
]
->
atttypid
);
out_func_oid
=
(
Oid
)
GetOutputFunction
(
attr
[
i
]
->
atttypid
);
...
@@ -198,6 +197,8 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
...
@@ -198,6 +197,8 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
elements
[
i
]
=
GetTypeElement
(
attr
[
i
]
->
atttypid
);
elements
[
i
]
=
GetTypeElement
(
attr
[
i
]
->
atttypid
);
}
}
}
else
{
}
else
{
elements
=
NULL
;
out_functions
=
NULL
;
nulls
=
(
char
*
)
palloc
(
attr_count
);
nulls
=
(
char
*
)
palloc
(
attr_count
);
for
(
i
=
0
;
i
<
attr_count
;
i
++
)
nulls
[
i
]
=
' '
;
for
(
i
=
0
;
i
<
attr_count
;
i
++
)
nulls
[
i
]
=
' '
;
...
@@ -295,23 +296,25 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
...
@@ -295,23 +296,25 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
bool
isnull
;
bool
isnull
;
bool
has_index
;
bool
has_index
;
int
done
=
0
;
int
done
=
0
;
char
*
string
,
*
ptr
;
char
*
string
=
NULL
,
*
ptr
;
Relation
*
index_rels
;
Relation
*
index_rels
;
int32
len
,
null_ct
,
null_id
;
int32
len
,
null_ct
,
null_id
;
int32
ntuples
,
tuples_read
=
0
;
int32
ntuples
,
tuples_read
=
0
;
bool
reading_to_eof
=
true
;
bool
reading_to_eof
=
true
;
Oid
*
elements
;
Oid
*
elements
;
FuncIndexInfo
*
finfo
,
**
finfoP
;
FuncIndexInfo
*
finfo
,
**
finfoP
=
NULL
;
TupleDesc
*
itupdescArr
;
TupleDesc
*
itupdescArr
;
HeapTuple
pgIndexTup
;
HeapTuple
pgIndexTup
;
IndexTupleForm
*
pgIndexP
;
IndexTupleForm
*
pgIndexP
=
NULL
;
int
*
indexNatts
;
int
*
indexNatts
=
NULL
;
char
*
predString
;
char
*
predString
;
Node
**
indexPred
;
Node
**
indexPred
=
NULL
;
TupleDesc
rtupdesc
;
TupleDesc
rtupdesc
;
ExprContext
*
econtext
;
ExprContext
*
econtext
=
NULL
;
#ifndef OMIT_PARTIAL_INDEX
TupleTable
tupleTable
;
TupleTable
tupleTable
;
TupleTableSlot
*
slot
;
TupleTableSlot
*
slot
=
NULL
;
#endif
int
natts
;
int
natts
;
AttrNumber
*
attnumP
;
AttrNumber
*
attnumP
;
Datum
idatum
;
Datum
idatum
;
...
@@ -416,6 +419,8 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
...
@@ -416,6 +419,8 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
}
}
else
else
{
{
in_functions
=
NULL
;
elements
=
NULL
;
fread
(
&
ntuples
,
sizeof
(
int32
),
1
,
fp
);
fread
(
&
ntuples
,
sizeof
(
int32
),
1
,
fp
);
if
(
ntuples
!=
0
)
reading_to_eof
=
false
;
if
(
ntuples
!=
0
)
reading_to_eof
=
false
;
}
}
...
@@ -874,7 +879,7 @@ CopyAttributeOut(FILE *fp, char *string, char *delim)
...
@@ -874,7 +879,7 @@ CopyAttributeOut(FILE *fp, char *string, char *delim)
if
(
len
&&
(
string
[
0
]
==
'{'
)
&&
(
string
[
len
-
1
]
==
'}'
))
if
(
len
&&
(
string
[
0
]
==
'{'
)
&&
(
string
[
len
-
1
]
==
'}'
))
is_array
=
true
;
is_array
=
true
;
for
(
;
c
=
*
string
;
string
++
)
{
for
(
;
(
c
=
*
string
)
!=
0
;
string
++
)
{
if
(
c
==
delim
[
0
]
||
c
==
'\n'
||
if
(
c
==
delim
[
0
]
||
c
==
'\n'
||
(
c
==
'\\'
&&
!
is_array
))
(
c
==
'\\'
&&
!
is_array
))
fputc
(
'\\'
,
fp
);
fputc
(
'\\'
,
fp
);
...
...
src/backend/commands/defind.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.
4 1996/08/26 06:30:23
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.
5 1996/10/23 07:39:57
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -129,8 +129,6 @@ DefineIndex(char *heapRelationName,
...
@@ -129,8 +129,6 @@ DefineIndex(char *heapRelationName,
* -- JMH, 7/22/96
* -- JMH, 7/22/96
*/
*/
foreach
(
pl
,
parameterList
)
{
foreach
(
pl
,
parameterList
)
{
int
count
;
char
*
ptr
;
ParamString
*
param
=
(
ParamString
*
)
lfirst
(
pl
);
ParamString
*
param
=
(
ParamString
*
)
lfirst
(
pl
);
if
(
!
strcasecmp
(
param
->
name
,
"islossy"
))
if
(
!
strcasecmp
(
param
->
name
,
"islossy"
))
...
@@ -138,7 +136,6 @@ DefineIndex(char *heapRelationName,
...
@@ -138,7 +136,6 @@ DefineIndex(char *heapRelationName,
}
}
/*
/*
* Convert the partial-index predicate from parsetree form to plan
* Convert the partial-index predicate from parsetree form to plan
* form, so it can be readily evaluated during index creation.
* form, so it can be readily evaluated during index creation.
...
...
src/backend/commands/define.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.
1.1.1 1996/07/09 06:21:20
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.
2 1996/10/23 07:40:01
scrappy 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
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include "catalog/pg_aggregate.h"
#include "catalog/pg_aggregate.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "catalog/pg_type.h"
#include "catalog/pg_operator.h"
#include "utils/syscache.h"
#include "utils/syscache.h"
#include "nodes/pg_list.h"
#include "nodes/pg_list.h"
#include "nodes/parsenodes.h"
#include "nodes/parsenodes.h"
...
@@ -74,10 +75,9 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
...
@@ -74,10 +75,9 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
char
*
prosrc_str
;
char
*
prosrc_str
;
char
*
prorettype
;
char
*
prorettype
;
char
*
languageName
;
char
*
languageName
;
bool
canCache
;
bool
canCache
=
FALSE
;
bool
trusted
=
TRUE
;
List
*
argList
;
List
*
argList
;
int32
byte_pct
,
perbyte_cpu
,
percall_cpu
,
outin_ratio
;
int32
byte_pct
=
100
,
perbyte_cpu
,
percall_cpu
,
outin_ratio
=
100
;
bool
returnsSet
;
bool
returnsSet
;
int
i
;
int
i
;
...
@@ -112,7 +112,6 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
...
@@ -112,7 +112,6 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
List
*
pl
;
List
*
pl
;
/* the defaults */
/* the defaults */
canCache
=
FALSE
;
byte_pct
=
BYTE_PCT
;
byte_pct
=
BYTE_PCT
;
perbyte_cpu
=
PERBYTE_CPU
;
perbyte_cpu
=
PERBYTE_CPU
;
percall_cpu
=
PERCALL_CPU
;
percall_cpu
=
PERCALL_CPU
;
...
@@ -165,12 +164,8 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
...
@@ -165,12 +164,8 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
}
}
}
}
}
else
if
(
!
strcmp
(
languageName
,
"sql"
))
{
}
else
if
(
!
strcmp
(
languageName
,
"sql"
))
{
canCache
=
false
;
trusted
=
true
;
/* query optimizer groks sql, these are meaningless */
/* query optimizer groks sql, these are meaningless */
perbyte_cpu
=
percall_cpu
=
0
;
perbyte_cpu
=
percall_cpu
=
0
;
byte_pct
=
outin_ratio
=
100
;
}
else
{
}
else
{
elog
(
WARN
,
"DefineFunction: language '%s' is not supported"
,
elog
(
WARN
,
"DefineFunction: language '%s' is not supported"
,
languageName
);
languageName
);
...
@@ -208,7 +203,7 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
...
@@ -208,7 +203,7 @@ DefineFunction(ProcedureStmt *stmt, CommandDest dest)
prosrc_str
,
/* converted to text later */
prosrc_str
,
/* converted to text later */
probin_str
,
/* converted to text later */
probin_str
,
/* converted to text later */
canCache
,
canCache
,
trusted
,
TRUE
,
byte_pct
,
byte_pct
,
perbyte_cpu
,
perbyte_cpu
,
percall_cpu
,
percall_cpu
,
...
...
src/backend/commands/explain.c
View file @
f36b2560
...
@@ -7,10 +7,12 @@
...
@@ -7,10 +7,12 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.
1.1.1 1996/07/09 06:21:21
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.
2 1996/10/23 07:40:08
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include "postgres.h"
#include "postgres.h"
#include "parser/catalog_utils.h"
#include "parser/catalog_utils.h"
#include "parser/parse_query.h"
/* for MakeTimeRange() */
#include "parser/parse_query.h"
/* for MakeTimeRange() */
...
@@ -157,6 +159,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -157,6 +159,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
pname
=
"Tee"
;
pname
=
"Tee"
;
break
;
break
;
default:
default:
pname
=
NULL
;
break
;
break
;
}
}
...
...
src/backend/commands/remove.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.
2 1996/08/19 01:53:3
9 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.
3 1996/10/23 07:40:0
9 scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -321,7 +321,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
...
@@ -321,7 +321,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
Buffer
buffer
=
InvalidBuffer
;
Buffer
buffer
=
InvalidBuffer
;
bool
bufferUsed
=
FALSE
;
bool
bufferUsed
=
FALSE
;
Oid
argList
[
8
];
Oid
argList
[
8
];
Form_pg_proc
the_proc
;
Form_pg_proc
the_proc
=
NULL
;
ItemPointerData
itemPointerData
;
ItemPointerData
itemPointerData
;
static
ScanKeyData
key
[
3
]
=
{
static
ScanKeyData
key
[
3
]
=
{
{
0
,
Anum_pg_proc_proname
,
NameEqualRegProcedure
}
{
0
,
Anum_pg_proc_proname
,
NameEqualRegProcedure
}
...
...
src/backend/commands/vacuum.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
4 1996/10/18 08:13:36 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.
5 1996/10/23 07:40:10 scrappy
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include "storage/smgr.h"
#include "storage/smgr.h"
#include "storage/lmgr.h"
#include "utils/elog.h"
#include "utils/elog.h"
#include "utils/mcxt.h"
#include "utils/mcxt.h"
...
@@ -206,7 +207,7 @@ _vc_getrels(Portal p, NameData *VacRelP)
...
@@ -206,7 +207,7 @@ _vc_getrels(Portal p, NameData *VacRelP)
Buffer
buf
;
Buffer
buf
;
PortalVariableMemory
portalmem
;
PortalVariableMemory
portalmem
;
MemoryContext
old
;
MemoryContext
old
;
VRelList
vrl
,
cur
;
VRelList
vrl
,
cur
=
NULL
;
Datum
d
;
Datum
d
;
char
*
rname
;
char
*
rname
;
char
rkind
;
char
rkind
;
...
@@ -404,7 +405,7 @@ _vc_vacheap(Portal p, VRelList curvrl, Relation onerel)
...
@@ -404,7 +405,7 @@ _vc_vacheap(Portal p, VRelList curvrl, Relation onerel)
Buffer
buf
;
Buffer
buf
;
Page
page
;
Page
page
;
OffsetNumber
offnum
,
maxoff
;
OffsetNumber
offnum
,
maxoff
;
Relation
archrel
;
Relation
archrel
=
NULL
;
bool
isarchived
;
bool
isarchived
;
int
nvac
;
int
nvac
;
int
ntups
;
int
ntups
;
...
@@ -883,7 +884,7 @@ _vc_free(Portal p, VRelList vrl)
...
@@ -883,7 +884,7 @@ _vc_free(Portal p, VRelList vrl)
{
{
VRelList
p_vrl
;
VRelList
p_vrl
;
VAttList
p_val
,
val
;
VAttList
p_val
,
val
;
VPageDescr
p_vpd
,
*
vpd
;
VPageDescr
*
vpd
;
int
i
;
int
i
;
MemoryContext
old
;
MemoryContext
old
;
PortalVariableMemory
pmem
;
PortalVariableMemory
pmem
;
...
...
src/backend/executor/execMain.c
View file @
f36b2560
...
@@ -26,11 +26,12 @@
...
@@ -26,11 +26,12 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.
4 1996/09/19 19:57:18
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.
5 1996/10/23 07:40:26
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/nodeIndexscan.h"
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "utils/acl.h"
#include "utils/acl.h"
...
@@ -221,6 +222,7 @@ ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count)
...
@@ -221,6 +222,7 @@ ExecutorRun(QueryDesc *queryDesc, EState *estate, int feature, int count)
destination
);
destination
);
break
;
break
;
default:
default:
result
=
NULL
;
elog
(
DEBUG
,
"ExecutorRun: Unknown feature %d"
,
feature
);
elog
(
DEBUG
,
"ExecutorRun: Unknown feature %d"
,
feature
);
break
;
break
;
}
}
...
...
src/backend/include/miscadmin.h
View file @
f36b2560
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: miscadmin.h,v 1.
4 1996/10/07 03:28:1
2 scrappy Exp $
* $Id: miscadmin.h,v 1.
5 1996/10/23 07:40:3
2 scrappy Exp $
*
*
* NOTES
* NOTES
* some of the information in this file will be moved to
* some of the information in this file will be moved to
...
@@ -23,16 +23,6 @@
...
@@ -23,16 +23,6 @@
#ifndef MISCADMIN_H
#ifndef MISCADMIN_H
#define MISCADMIN_H
#define MISCADMIN_H
/* ----------------
* note: <sys/types.h> was in unix.h This should be moved
* to the .c files.
* ----------------
*/
#include <sys/types.h>
#include "postgres.h"
#include "storage/backendid.h"
/*****************************************************************************
/*****************************************************************************
* globals.h -- *
* globals.h -- *
*****************************************************************************/
*****************************************************************************/
...
...
src/backend/port/BSD44_derived/dl.c
View file @
f36b2560
...
@@ -43,6 +43,8 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
...
@@ -43,6 +43,8 @@ static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include "port-protos.h"
static
char
error_message
[
BUFSIZ
];
static
char
error_message
[
BUFSIZ
];
char
*
char
*
...
@@ -56,7 +58,7 @@ BSD44_derived_dlerror(void)
...
@@ -56,7 +58,7 @@ BSD44_derived_dlerror(void)
}
}
void
*
void
*
BSD44_derived_dlopen
(
char
*
file
,
int
num
)
BSD44_derived_dlopen
(
c
onst
c
har
*
file
,
int
num
)
{
{
#ifdef __mips__
#ifdef __mips__
(
void
)
sprintf
(
error_message
,
"dlopen (%s) not supported"
,
file
);
(
void
)
sprintf
(
error_message
,
"dlopen (%s) not supported"
,
file
);
...
@@ -72,7 +74,7 @@ BSD44_derived_dlopen(char *file, int num)
...
@@ -72,7 +74,7 @@ BSD44_derived_dlopen(char *file, int num)
}
}
void
*
void
*
BSD44_derived_dlsym
(
void
*
handle
,
char
*
name
)
BSD44_derived_dlsym
(
void
*
handle
,
c
onst
c
har
*
name
)
{
{
#ifdef __mips__
#ifdef __mips__
(
void
)
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
(
void
)
sprintf
(
error_message
,
"dlsym (%s) failed"
,
name
);
...
...
src/backend/port/BSD44_derived/port-protos.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: port-protos.h,v 1.
1.1.1 1996/07/09 06:21:42
scrappy Exp $
* $Id: port-protos.h,v 1.
2 1996/10/23 07:40:45
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -38,4 +38,10 @@
...
@@ -38,4 +38,10 @@
#define pg_dlclose BSD44_derived_dlclose
#define pg_dlclose BSD44_derived_dlclose
#define pg_dlerror BSD44_derived_dlerror
#define pg_dlerror BSD44_derived_dlerror
char
*
BSD44_derived_dlerror
(
void
);
void
*
BSD44_derived_dlopen
(
const
char
*
filename
,
int
num
);
void
*
BSD44_derived_dlsym
(
void
*
handle
,
const
char
*
name
);
void
*
BSD44_derived_dlsym
(
void
*
handle
,
const
char
*
name
);
void
BSD44_derived_dlclose
(
void
*
handle
);
#endif
/* PORT_PROTOS_H */
#endif
/* PORT_PROTOS_H */
src/backend/utils/cache/relcache.c
View file @
f36b2560
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.
1.1.1 1996/07/09 06:22:06
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.
2 1996/10/23 07:41:00
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -237,9 +237,10 @@ typedef struct relnamecacheent {
...
@@ -237,9 +237,10 @@ typedef struct relnamecacheent {
static
void
formrdesc
(
char
*
relationName
,
u_int
natts
,
static
void
formrdesc
(
char
*
relationName
,
u_int
natts
,
FormData_pg_attribute
att
[]);
FormData_pg_attribute
att
[]);
#if 0 /* See comments at line 1304 */
static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
#endif
static
char
*
BuildDescInfoError
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
ScanPgRelation
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
ScanPgRelation
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
scan_pg_rel_seq
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
scan_pg_rel_seq
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
scan_pg_rel_ind
(
RelationBuildDescInfo
buildinfo
);
static
HeapTuple
scan_pg_rel_ind
(
RelationBuildDescInfo
buildinfo
);
...
@@ -260,6 +261,7 @@ static void IndexedAccessMethodInitialize(Relation relation);
...
@@ -260,6 +261,7 @@ static void IndexedAccessMethodInitialize(Relation relation);
*/
*/
#if 0 /* XXX This doesn't seem to be used anywhere */
/* --------------------------------
/* --------------------------------
* BuildDescInfoError returns a string appropriate to
* BuildDescInfoError returns a string appropriate to
* the buildinfo passed to it
* the buildinfo passed to it
...
@@ -282,6 +284,7 @@ BuildDescInfoError(RelationBuildDescInfo buildinfo)
...
@@ -282,6 +284,7 @@ BuildDescInfoError(RelationBuildDescInfo buildinfo)
return errBuf;
return errBuf;
}
}
#endif
/* --------------------------------
/* --------------------------------
* ScanPgRelation
* ScanPgRelation
...
@@ -403,6 +406,9 @@ scan_pg_rel_ind(RelationBuildDescInfo buildinfo)
...
@@ -403,6 +406,9 @@ scan_pg_rel_ind(RelationBuildDescInfo buildinfo)
default:
default:
elog
(
WARN
,
"ScanPgRelation: bad buildinfo"
);
elog
(
WARN
,
"ScanPgRelation: bad buildinfo"
);
/* XXX I hope this is right. It seems better than returning
* an uninitialized value */
return_tuple
=
NULL
;
}
}
/* all done */
/* all done */
...
@@ -641,19 +647,16 @@ RelationBuildRuleLock(Relation relation)
...
@@ -641,19 +647,16 @@ RelationBuildRuleLock(Relation relation)
rule
->
ruleId
=
pg_rewrite_tuple
->
t_oid
;
rule
->
ruleId
=
pg_rewrite_tuple
->
t_oid
;
/* XXX too lazy to fix the type cast problem
* (see rewriteDefine.c:121)
*/
rule
->
event
=
rule
->
event
=
(
CmdType
)((
char
)
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
(
int
)
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
Anum_pg_rewrite_ev_type
,
pg_rewrite_tupdesc
,
Anum_pg_rewrite_ev_type
,
pg_rewrite_tupdesc
,
&
isnull
)
-
48
)
;
&
isnull
)
-
48
;
rule
->
attrno
=
rule
->
attrno
=
(
AttrNumber
)
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
(
int
)
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
Anum_pg_rewrite_ev_attr
,
pg_rewrite_tupdesc
,
Anum_pg_rewrite_ev_attr
,
pg_rewrite_tupdesc
,
&
isnull
);
&
isnull
);
rule
->
isInstead
=
rule
->
isInstead
=
(
bool
)
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
!!
heap_getattr
(
pg_rewrite_tuple
,
InvalidBuffer
,
Anum_pg_rewrite_is_instead
,
pg_rewrite_tupdesc
,
Anum_pg_rewrite_is_instead
,
pg_rewrite_tupdesc
,
&
isnull
);
&
isnull
);
...
@@ -1273,6 +1276,7 @@ RelationIdInvalidateRelationCacheByRelationId(Oid relationId)
...
@@ -1273,6 +1276,7 @@ RelationIdInvalidateRelationCacheByRelationId(Oid relationId)
}
}
}
}
#if 0 /* See comments at line 1304 */
/* --------------------------------
/* --------------------------------
* RelationIdInvalidateRelationCacheByAccessMethodId
* RelationIdInvalidateRelationCacheByAccessMethodId
*
*
...
@@ -1297,6 +1301,8 @@ RelationFlushIndexes(Relation *r,
...
@@ -1297,6 +1301,8 @@ RelationFlushIndexes(Relation *r,
RelationFlushRelation(&relation, false);
RelationFlushRelation(&relation, false);
}
}
}
}
#endif
void
void
RelationIdInvalidateRelationCacheByAccessMethodId
(
Oid
accessMethodId
)
RelationIdInvalidateRelationCacheByAccessMethodId
(
Oid
accessMethodId
)
...
...
src/include/access/gist.h
View file @
f36b2560
...
@@ -12,8 +12,11 @@
...
@@ -12,8 +12,11 @@
#ifndef GIST_H
#ifndef GIST_H
#define GIST_H
#define GIST_H
#include "utils/rel.h"
#include "storage/off.h"
#include "storage/block.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include "access/skey.h"
/*
/*
** You can have as many strategies as you please in GiSTs, as
** You can have as many strategies as you please in GiSTs, as
...
@@ -146,4 +149,5 @@ extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
...
@@ -146,4 +149,5 @@ extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation
r
,
Page
pg
,
OffsetNumber
o
,
int
b
,
bool
l
)
;
Relation
r
,
Page
pg
,
OffsetNumber
o
,
int
b
,
bool
l
)
;
extern
void
gistcentryinit
(
GISTSTATE
*
giststate
,
GISTENTRY
*
e
,
char
*
pr
,
extern
void
gistcentryinit
(
GISTSTATE
*
giststate
,
GISTENTRY
*
e
,
char
*
pr
,
Relation
r
,
Page
pg
,
OffsetNumber
o
,
int
b
,
bool
l
)
;
Relation
r
,
Page
pg
,
OffsetNumber
o
,
int
b
,
bool
l
)
;
extern
StrategyNumber
RelationGetGISTStrategy
(
Relation
,
AttrNumber
,
RegProcedure
);
#endif
/* GIST_H */
#endif
/* GIST_H */
src/include/access/iqual.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: iqual.h,v 1.
1 1996/08/27 21:50:16
scrappy Exp $
* $Id: iqual.h,v 1.
2 1996/10/23 07:41:27
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "utils/rel.h"
#include "utils/rel.h"
#include "access/skey.h"
#include "access/skey.h"
#include "access/itup.h"
/* ----------------
/* ----------------
* index tuple qualification support
* index tuple qualification support
...
...
src/include/access/nbtree.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nbtree.h,v 1.
1 1996/08/27 21:50:1
9 scrappy Exp $
* $Id: nbtree.h,v 1.
2 1996/10/23 07:41:2
9 scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
#include "access/relscan.h"
#include "access/relscan.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "nodes/pg_list.h"
#include "nodes/pg_list.h"
#include "storage/page.h"
#include "storage/bufpage.h"
#include "storage/item.h"
#include "utils/memutils.h"
/*
/*
* BTPageOpaqueData -- At the end of every page, we store a pointer
* BTPageOpaqueData -- At the end of every page, we store a pointer
...
...
src/include/access/relscan.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: relscan.h,v 1.
2 1996/10/19 06:27:08
scrappy Exp $
* $Id: relscan.h,v 1.
3 1996/10/23 07:41:30
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -14,11 +14,9 @@
...
@@ -14,11 +14,9 @@
#define RELSCAN_H
#define RELSCAN_H
#include "utils/tqual.h"
#include "utils/tqual.h"
#include "utils/rel.h"
#include "storage/buf.h"
#include "storage/buf.h"
typedef
ItemPointerData
MarkData
;
typedef
ItemPointerData
MarkData
;
typedef
struct
HeapScanDescData
{
typedef
struct
HeapScanDescData
{
...
...
src/include/access/transam.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: transam.h,v 1.
1 1996/08/27 21:50:26
scrappy Exp $
* $Id: transam.h,v 1.
2 1996/10/23 07:41:31
scrappy Exp $
*
*
* NOTES
* NOTES
* Transaction System Version 101 now support proper oid
* Transaction System Version 101 now support proper oid
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
#ifndef TRANSAM_H
#ifndef TRANSAM_H
#define TRANSAM_H
#define TRANSAM_H
#include "utils/nabstime.h"
#include "utils/rel.h"
#include "storage/bufmgr.h"
/* ----------------
/* ----------------
* transaction system version id
* transaction system version id
*
*
...
...
src/include/executor/nodeIndexscan.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nodeIndexscan.h,v 1.
1 1996/08/28 07:22:20
scrappy Exp $
* $Id: nodeIndexscan.h,v 1.
2 1996/10/23 07:41:34
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -29,4 +29,5 @@ extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent);
...
@@ -29,4 +29,5 @@ extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent);
extern
int
ExecCountSlotsIndexScan
(
IndexScan
*
node
);
extern
int
ExecCountSlotsIndexScan
(
IndexScan
*
node
);
extern
void
ExecIndexReScan
(
IndexScan
*
node
,
ExprContext
*
exprCtxt
,
Plan
*
parent
);
#endif
/* NODEINDEXSCAN_H */
#endif
/* NODEINDEXSCAN_H */
src/include/executor/tuptable.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: tuptable.h,v 1.
1 1996/08/28 07:22:28
scrappy Exp $
* $Id: tuptable.h,v 1.
2 1996/10/23 07:41:36
scrappy Exp $
*
*
* NOTES
* NOTES
* The tuple table interface is getting pretty ugly.
* The tuple table interface is getting pretty ugly.
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
#ifndef TUPTABLE_H
#ifndef TUPTABLE_H
#define TUPTABLE_H
#define TUPTABLE_H
#include "access/htup.h"
#include "access/relscan.h"
/* ----------------
/* ----------------
* Note: the executor tuple table is managed and manipulated by special
* Note: the executor tuple table is managed and manipulated by special
* code and macros in executor/execTuples.c and tupTable.h
* code and macros in executor/execTuples.c and tupTable.h
...
...
src/include/libpq/libpq.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: libpq.h,v 1.
2 1996/10/20 21:51:45
scrappy Exp $
* $Id: libpq.h,v 1.
3 1996/10/23 07:41:41
scrappy Exp $
*
*
* NOTES
* NOTES
* This file contains definitions for structures and
* This file contains definitions for structures and
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
#ifndef LIBPQ_H
#ifndef LIBPQ_H
#define LIBPQ_H
#define LIBPQ_H
#include <netinet/in.h>
#include "libpq/pqcomm.h"
/* ----------------
/* ----------------
* PQArgBlock --
* PQArgBlock --
* Information (pointer to array of this structure) required
* Information (pointer to array of this structure) required
...
...
src/include/libpq/pqcomm.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: pqcomm.h,v 1.
2 1996/10/11 09:12:18 bryanh
Exp $
* $Id: pqcomm.h,v 1.
3 1996/10/23 07:41:47 scrappy
Exp $
*
*
* NOTES
* NOTES
* Some of this should move to libpq.h
* Some of this should move to libpq.h
...
@@ -16,7 +16,9 @@
...
@@ -16,7 +16,9 @@
#ifndef PQCOMM_H
#ifndef PQCOMM_H
#define PQCOMM_H
#define PQCOMM_H
#include <stdio.h>
#include <sys/types.h>
#include <sys/types.h>
#ifdef WIN32
#ifdef WIN32
#include <winsock.h>
#include <winsock.h>
#else
#else
...
...
src/include/nodes/execnodes.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: execnodes.h,v 1.
3 1996/10/20 06:35:07
scrappy Exp $
* $Id: execnodes.h,v 1.
4 1996/10/23 07:41:56
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include "nodes/params.h"
#include "nodes/params.h"
#include "access/sdir.h"
#include "access/sdir.h"
#include "access/funcindex.h"
#include "executor/hashjoin.h"
#include "executor/hashjoin.h"
#include "nodes/primnodes.h"
#include "nodes/primnodes.h"
#include "nodes/memnodes.h"
#include "nodes/memnodes.h"
...
...
src/include/nodes/primnodes.h
View file @
f36b2560
...
@@ -6,13 +6,17 @@
...
@@ -6,13 +6,17 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: primnodes.h,v 1.
3 1996/10/19 04:48:30
scrappy Exp $
* $Id: primnodes.h,v 1.
4 1996/10/23 07:42:02
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#ifndef PRIMNODES_H
#ifndef PRIMNODES_H
#define PRIMNODES_H
#define PRIMNODES_H
#include "nodes/pg_list.h"
#include "nodes/nodes.h"
#include "access/attnum.h"
#include "utils/fcache.h"
#include "utils/fcache.h"
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
...
src/include/storage/bufpage.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: bufpage.h,v 1.
4 1996/10/20 06:35:16
scrappy Exp $
* $Id: bufpage.h,v 1.
5 1996/10/23 07:42:07
scrappy Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include "storage/itemid.h"
#include "storage/itemid.h"
#include "storage/item.h"
#include "storage/item.h"
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/page.h"
#include "storage/off.h"
#include "storage/off.h"
/*
/*
...
@@ -72,7 +73,6 @@
...
@@ -72,7 +73,6 @@
* initialize its pages with PageInit and then set its own opaque
* initialize its pages with PageInit and then set its own opaque
* fields.
* fields.
*/
*/
typedef
Pointer
Page
;
/*
/*
* PageIsValid --
* PageIsValid --
...
...
src/include/utils/tqual.h
View file @
f36b2560
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: tqual.h,v 1.
2 1996/10/20 06:35:27
scrappy Exp $
* $Id: tqual.h,v 1.
3 1996/10/23 07:42:13
scrappy Exp $
*
*
* NOTE
* NOTE
* It may be desirable to allow time qualifications to indicate
* It may be desirable to allow time qualifications to indicate
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#define TQUAL_H
#define TQUAL_H
#include "utils/nabstime.h"
#include "utils/nabstime.h"
#include "access/htup.h"
typedef
struct
TimeQualSpace
{
typedef
struct
TimeQualSpace
{
char
data
[
12
];
char
data
[
12
];
...
...
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