mirror of
https://github.com/postgres/postgres.git
synced 2025-06-03 00:02:26 -04:00
Remove archive stuff.
This commit is contained in:
parent
e9e1ff226f
commit
0889dcd6f7
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.22 1997/11/20 23:19:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.23 1997/11/21 18:03:55 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
@ -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)
|
||||||
|
@ -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:
|
|||||||
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:
|
|||||||
/* 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);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.31 1997/11/20 23:20:38 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.32 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 @@
|
|||||||
#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;
|
|||||||
*/
|
*/
|
||||||
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,
|
|||||||
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,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
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
|
|||||||
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,
|
|||||||
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)
|
|||||||
*/
|
*/
|
||||||
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[],
|
|||||||
* 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[],
|
|||||||
* 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[],
|
|||||||
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)
|
|||||||
*/
|
*/
|
||||||
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)
|
|||||||
{
|
{
|
||||||
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);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.26 1997/11/20 23:20:44 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.27 1997/11/21 18:04:16 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
@ -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,
|
|||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
@ -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.. \
|
|||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user