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
0889dcd6
Commit
0889dcd6
authored
Nov 21, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove archive stuff.
parent
e9e1ff22
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
39 deletions
+15
-39
src/backend/access/heap/heapam.c
src/backend/access/heap/heapam.c
+2
-2
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+3
-9
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+7
-21
src/backend/catalog/index.c
src/backend/catalog/index.c
+1
-5
src/backend/commands/Makefile
src/backend/commands/Makefile
+2
-2
No files found.
src/backend/access/heap/heapam.c
View file @
0889dcd6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.2
2 1997/11/20 23:19:57
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.2
3 1997/11/21 18:03:55
momjian Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -650,7 +650,7 @@ heap_beginscan(Relation relation,
...
@@ -650,7 +650,7 @@ heap_beginscan(Relation relation,
*/
*/
sdesc
=
(
HeapScanDesc
)
palloc
(
sizeof
(
HeapScanDescData
));
sdesc
=
(
HeapScanDesc
)
palloc
(
sizeof
(
HeapScanDescData
));
relation
->
rd_nblocks
=
smgrnblocks
(
relation
->
rd_rel
->
relsmgr
,
relation
);
relation
->
rd_nblocks
=
smgrnblocks
(
DEFAULT_SMGR
,
relation
);
sdesc
->
rs_rd
=
relation
;
sdesc
->
rs_rd
=
relation
;
if
(
nkeys
)
if
(
nkeys
)
...
...
src/backend/bootstrap/bootparse.y
View file @
0889dcd6
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
5 1997/09/08 03:19:50
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
6 1997/11/21 18:04:03
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -171,9 +171,7 @@ CreateStmt:
...
@@ -171,9 +171,7 @@ CreateStmt:
if (DebugMode)
if (DebugMode)
puts("creating bootstrap relation");
puts("creating bootstrap relation");
tupdesc = CreateTupleDesc(numattr,attrtypes);
tupdesc = CreateTupleDesc(numattr,attrtypes);
reldesc = heap_creatr(LexIDStr($3),
reldesc = heap_creatr(LexIDStr($3), tupdesc);
DEFAULT_SMGR,
tupdesc);
if (DebugMode)
if (DebugMode)
puts("bootstrap relation created ok");
puts("bootstrap relation created ok");
}
}
...
@@ -184,11 +182,7 @@ CreateStmt:
...
@@ -184,11 +182,7 @@ CreateStmt:
/* extern Oid heap_create();*/
/* extern Oid heap_create();*/
tupdesc = CreateTupleDesc(numattr,attrtypes);
tupdesc = CreateTupleDesc(numattr,attrtypes);
id = heap_create(LexIDStr($3),
id = heap_create(LexIDStr($3), tupdesc);
NULL,
'n',
DEFAULT_SMGR,
tupdesc);
if (!Quiet)
if (!Quiet)
printf("CREATED relation %s with OID %d\n",
printf("CREATED relation %s with OID %d\n",
LexIDStr($3), id);
LexIDStr($3), id);
...
...
src/backend/catalog/heap.c
View file @
0889dcd6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
1 1997/11/20 23:20:38
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
2 1997/11/21 18:04:11
momjian Exp $
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
* heap_creatr() - Create an uncataloged heap relation
* heap_creatr() - Create an uncataloged heap relation
...
@@ -58,9 +58,8 @@
...
@@ -58,9 +58,8 @@
#include <string.h>
#include <string.h>
#endif
#endif
static
void
static
void
AddPgRelationTuple
(
Relation
pg_class_desc
,
AddPgRelationTuple
(
Relation
pg_class_desc
,
Relation
new_rel_desc
,
Oid
new_rel_oid
,
unsigned
natts
);
Relation
new_rel_desc
,
Oid
new_rel_oid
,
int
arch
,
unsigned
natts
);
static
void
AddToTempRelList
(
Relation
r
);
static
void
AddToTempRelList
(
Relation
r
);
static
void
DeletePgAttributeTuples
(
Relation
rdesc
);
static
void
DeletePgAttributeTuples
(
Relation
rdesc
);
static
void
DeletePgRelationTuple
(
Relation
rdesc
);
static
void
DeletePgRelationTuple
(
Relation
rdesc
);
...
@@ -165,7 +164,6 @@ static TempRelList *tempRels = NULL;
...
@@ -165,7 +164,6 @@ static TempRelList *tempRels = NULL;
*/
*/
Relation
Relation
heap_creatr
(
char
*
name
,
heap_creatr
(
char
*
name
,
unsigned
smgr
,
TupleDesc
tupDesc
)
TupleDesc
tupDesc
)
{
{
register
unsigned
i
;
register
unsigned
i
;
...
@@ -283,7 +281,6 @@ heap_creatr(char *name,
...
@@ -283,7 +281,6 @@ heap_creatr(char *name,
namestrcpy
(
&
(
rdesc
->
rd_rel
->
relname
),
relname
);
namestrcpy
(
&
(
rdesc
->
rd_rel
->
relname
),
relname
);
rdesc
->
rd_rel
->
relkind
=
RELKIND_UNCATALOGED
;
rdesc
->
rd_rel
->
relkind
=
RELKIND_UNCATALOGED
;
rdesc
->
rd_rel
->
relnatts
=
natts
;
rdesc
->
rd_rel
->
relnatts
=
natts
;
rdesc
->
rd_rel
->
relsmgr
=
smgr
;
if
(
tupDesc
->
constr
)
if
(
tupDesc
->
constr
)
rdesc
->
rd_rel
->
relchecks
=
tupDesc
->
constr
->
num_check
;
rdesc
->
rd_rel
->
relchecks
=
tupDesc
->
constr
->
num_check
;
...
@@ -313,7 +310,7 @@ heap_creatr(char *name,
...
@@ -313,7 +310,7 @@ heap_creatr(char *name,
*/
*/
rdesc
->
rd_tmpunlinked
=
TRUE
;
/* change once table is created */
rdesc
->
rd_tmpunlinked
=
TRUE
;
/* change once table is created */
rdesc
->
rd_fd
=
(
File
)
smgrcreate
(
smgr
,
rdesc
);
rdesc
->
rd_fd
=
(
File
)
smgrcreate
(
DEFAULT_SMGR
,
rdesc
);
rdesc
->
rd_tmpunlinked
=
FALSE
;
rdesc
->
rd_tmpunlinked
=
FALSE
;
RelationRegisterRelation
(
rdesc
);
RelationRegisterRelation
(
rdesc
);
...
@@ -631,7 +628,6 @@ static void
...
@@ -631,7 +628,6 @@ static void
AddPgRelationTuple
(
Relation
pg_class_desc
,
AddPgRelationTuple
(
Relation
pg_class_desc
,
Relation
new_rel_desc
,
Relation
new_rel_desc
,
Oid
new_rel_oid
,
Oid
new_rel_oid
,
int
arch
,
unsigned
natts
)
unsigned
natts
)
{
{
Form_pg_class
new_rel_reltup
;
Form_pg_class
new_rel_reltup
;
...
@@ -656,7 +652,6 @@ AddPgRelationTuple(Relation pg_class_desc,
...
@@ -656,7 +652,6 @@ AddPgRelationTuple(Relation pg_class_desc,
new_rel_reltup
->
relkind
=
RELKIND_SEQUENCE
;
new_rel_reltup
->
relkind
=
RELKIND_SEQUENCE
;
else
else
new_rel_reltup
->
relkind
=
RELKIND_RELATION
;
new_rel_reltup
->
relkind
=
RELKIND_RELATION
;
new_rel_reltup
->
relarch
=
arch
;
new_rel_reltup
->
relnatts
=
natts
;
new_rel_reltup
->
relnatts
=
natts
;
/* ----------------
/* ----------------
...
@@ -748,16 +743,12 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
...
@@ -748,16 +743,12 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
*/
*/
Oid
Oid
heap_create
(
char
relname
[],
heap_create
(
char
relname
[],
char
*
typename
,
/* not used currently */
int
arch
,
unsigned
smgr
,
TupleDesc
tupdesc
)
TupleDesc
tupdesc
)
{
{
Relation
pg_class_desc
;
Relation
pg_class_desc
;
Relation
new_rel_desc
;
Relation
new_rel_desc
;
Oid
new_rel_oid
;
Oid
new_rel_oid
;
/* NameData typeNameData; */
int
natts
=
tupdesc
->
natts
;
int
natts
=
tupdesc
->
natts
;
/* ----------------
/* ----------------
...
@@ -793,7 +784,7 @@ heap_create(char relname[],
...
@@ -793,7 +784,7 @@ heap_create(char relname[],
* of creating the disk file for the relation.
* of creating the disk file for the relation.
* ----------------
* ----------------
*/
*/
new_rel_desc
=
heap_creatr
(
relname
,
smgr
,
tupdesc
);
new_rel_desc
=
heap_creatr
(
relname
,
tupdesc
);
new_rel_oid
=
new_rel_desc
->
rd_att
->
attrs
[
0
]
->
attrelid
;
new_rel_oid
=
new_rel_desc
->
rd_att
->
attrs
[
0
]
->
attrelid
;
/* ----------------
/* ----------------
...
@@ -801,8 +792,6 @@ heap_create(char relname[],
...
@@ -801,8 +792,6 @@ heap_create(char relname[],
* we add a new system type corresponding to the new relation.
* we add a new system type corresponding to the new relation.
* ----------------
* ----------------
*/
*/
/* namestrcpy(&typeNameData, relname);*/
/* addNewRelationType(&typeNameData, new_rel_oid);*/
addNewRelationType
(
relname
,
new_rel_oid
);
addNewRelationType
(
relname
,
new_rel_oid
);
/* ----------------
/* ----------------
...
@@ -819,7 +808,6 @@ heap_create(char relname[],
...
@@ -819,7 +808,6 @@ heap_create(char relname[],
AddPgRelationTuple
(
pg_class_desc
,
AddPgRelationTuple
(
pg_class_desc
,
new_rel_desc
,
new_rel_desc
,
new_rel_oid
,
new_rel_oid
,
arch
,
natts
);
natts
);
StoreConstraints
(
new_rel_desc
);
StoreConstraints
(
new_rel_desc
);
...
@@ -1354,7 +1342,7 @@ heap_destroy(char *relname)
...
@@ -1354,7 +1342,7 @@ heap_destroy(char *relname)
*/
*/
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
{
{
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
smgrunlink
(
DEFAULT_SMGR
,
rdesc
);
}
}
rdesc
->
rd_tmpunlinked
=
TRUE
;
rdesc
->
rd_tmpunlinked
=
TRUE
;
...
@@ -1377,9 +1365,7 @@ heap_destroyr(Relation rdesc)
...
@@ -1377,9 +1365,7 @@ heap_destroyr(Relation rdesc)
{
{
ReleaseRelationBuffers
(
rdesc
);
ReleaseRelationBuffers
(
rdesc
);
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
{
smgrunlink
(
DEFAULT_SMGR
,
rdesc
);
smgrunlink
(
rdesc
->
rd_rel
->
relsmgr
,
rdesc
);
}
rdesc
->
rd_tmpunlinked
=
TRUE
;
rdesc
->
rd_tmpunlinked
=
TRUE
;
heap_close
(
rdesc
);
heap_close
(
rdesc
);
RemoveFromTempRelList
(
rdesc
);
RemoveFromTempRelList
(
rdesc
);
...
...
src/backend/catalog/index.c
View file @
0889dcd6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.2
6 1997/11/20 23:20:44
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.2
7 1997/11/21 18:04:16
momjian Exp $
*
*
*
*
* INTERFACE ROUTINES
* INTERFACE ROUTINES
...
@@ -568,10 +568,7 @@ ConstructIndexReldesc(Relation indexRelation, Oid amoid)
...
@@ -568,10 +568,7 @@ ConstructIndexReldesc(Relation indexRelation, Oid amoid)
indexRelation
->
rd_rel
->
relam
=
amoid
;
indexRelation
->
rd_rel
->
relam
=
amoid
;
indexRelation
->
rd_rel
->
reltuples
=
1
;
/* XXX */
indexRelation
->
rd_rel
->
reltuples
=
1
;
/* XXX */
indexRelation
->
rd_rel
->
relexpires
=
0
;
/* XXX */
indexRelation
->
rd_rel
->
relpreserved
=
0
;
/* XXX */
indexRelation
->
rd_rel
->
relkind
=
RELKIND_INDEX
;
indexRelation
->
rd_rel
->
relkind
=
RELKIND_INDEX
;
indexRelation
->
rd_rel
->
relarch
=
'n'
;
/* XXX */
}
}
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
@@ -858,7 +855,6 @@ UpdateIndexRelation(Oid indexoid,
...
@@ -858,7 +855,6 @@ UpdateIndexRelation(Oid indexoid,
}
}
indexForm
->
indisclustered
=
'\0'
;
/* XXX constant */
indexForm
->
indisclustered
=
'\0'
;
/* XXX constant */
indexForm
->
indisarchived
=
'\0'
;
/* XXX constant */
/* ----------------
/* ----------------
* open the system catalog index relation
* open the system catalog index relation
...
...
src/backend/commands/Makefile
View file @
0889dcd6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Makefile for commands
# Makefile for commands
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.
5 1997/10/28 14:54:43 vadim
Exp $
# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.
6 1997/11/21 18:04:26 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -18,7 +18,7 @@ INCLUDE_OPT = -I.. \
...
@@ -18,7 +18,7 @@ INCLUDE_OPT = -I.. \
CFLAGS
+=
$(INCLUDE_OPT)
CFLAGS
+=
$(INCLUDE_OPT)
OBJS
=
async.o creatinh.o command.o copy.o defind.o define.o
\
OBJS
=
async.o creatinh.o command.o copy.o defind.o define.o
\
purge.o
remove.o rename.o vacuum.o version.o view.o cluster.o
\
remove.o rename.o vacuum.o version.o view.o cluster.o
\
recipe.o explain.o sequence.o trigger.o proclang.o
recipe.o explain.o sequence.o trigger.o proclang.o
all
:
SUBSYS.o
all
:
SUBSYS.o
...
...
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