Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3fa2bb3

Browse files
committed
Remove archive stuff.
1 parent 0889dcd commit 3fa2bb3

38 files changed

+158
-790
lines changed

src/backend/commands/cluster.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
*
1616
* IDENTIFICATION
17-
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.16 1997/11/20 23:20:58 momjian Exp $
17+
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.17 1997/11/21 18:09:46 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -215,11 +215,7 @@ copy_heap(Oid OIDOldHeap)
215215

216216
tupdesc = CreateTupleDescCopy(OldHeapDesc);
217217

218-
OIDNewHeap = heap_create(NewName,
219-
NULL,
220-
OldHeap->rd_rel->relarch,
221-
OldHeap->rd_rel->relsmgr,
222-
tupdesc);
218+
OIDNewHeap = heap_create(NewName, tupdesc);
223219

224220
if (!OidIsValid(OIDNewHeap))
225221
elog(WARN, "clusterheap: cannot create temporary heap relation\n");

src/backend/commands/creatinh.c

+2-112
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.18 1997/10/25 01:08:51 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.19 1997/11/21 18:09:49 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -51,16 +51,9 @@ DefineRelation(CreateStmt *stmt)
5151
List *schema = stmt->tableElts;
5252
int numberOfAttributes;
5353
Oid relationId;
54-
char archChar;
5554
List *inheritList = NULL;
56-
char *archiveName = NULL;
5755
TupleDesc descriptor;
5856
List *constraints;
59-
int heaploc,
60-
archloc;
61-
62-
char *typename = NULL;/* the typename of this relation. not
63-
* useod for now */
6457

6558
if (strlen(stmt->relname) >= NAMEDATALEN)
6659
elog(WARN, "the relation name %s is >= %d characters long", stmt->relname,
@@ -75,53 +68,6 @@ DefineRelation(CreateStmt *stmt)
7568
*/
7669
inheritList = stmt->inhRelnames;
7770

78-
/* ----------------
79-
* determine archive mode
80-
* XXX use symbolic constants...
81-
* ----------------
82-
*/
83-
archChar = 'n';
84-
85-
switch (stmt->archiveType)
86-
{
87-
case ARCH_NONE:
88-
archChar = 'n';
89-
break;
90-
case ARCH_LIGHT:
91-
archChar = 'l';
92-
break;
93-
case ARCH_HEAVY:
94-
archChar = 'h';
95-
break;
96-
default:
97-
elog(WARN, "Botched archive mode %d, ignoring",
98-
stmt->archiveType);
99-
break;
100-
}
101-
102-
if (stmt->location == -1)
103-
heaploc = 0;
104-
else
105-
heaploc = stmt->location;
106-
107-
/*
108-
* For now, any user-defined relation defaults to the magnetic disk
109-
* storgage manager. --mao 2 july 91
110-
*/
111-
if (stmt->archiveLoc == -1)
112-
{
113-
archloc = 0;
114-
}
115-
else
116-
{
117-
if (archChar == 'n')
118-
{
119-
elog(WARN, "Set archive location, but not mode, for %s",
120-
relname);
121-
}
122-
archloc = stmt->archiveLoc;
123-
}
124-
12571
/* ----------------
12672
* generate relation schema, including inherited attributes.
12773
* ----------------
@@ -191,42 +137,9 @@ DefineRelation(CreateStmt *stmt)
191137
}
192138
}
193139

194-
relationId = heap_create(relname,
195-
typename,
196-
archChar,
197-
heaploc,
198-
descriptor);
140+
relationId = heap_create(relname, descriptor);
199141

200142
StoreCatalogInheritance(relationId, inheritList);
201-
202-
/*
203-
* create an archive relation if necessary
204-
*/
205-
if (archChar != 'n')
206-
{
207-
TupleDesc tupdesc;
208-
209-
/*
210-
* Need to create an archive relation for this heap relation. We
211-
* cobble up the command by hand, and increment the command
212-
* counter ourselves.
213-
*/
214-
215-
CommandCounterIncrement();
216-
archiveName = MakeArchiveName(relationId);
217-
218-
tupdesc = CreateTupleDescCopy(descriptor); /* get rid of
219-
* constraints */
220-
(void) heap_create(archiveName,
221-
typename,
222-
'n', /* archive isn't archived */
223-
archloc,
224-
tupdesc);
225-
226-
FreeTupleDesc(tupdesc);
227-
FreeTupleDesc(descriptor);
228-
pfree(archiveName);
229-
}
230143
}
231144

232145
/*
@@ -664,26 +577,3 @@ checkAttrExists(char *attributeName, char *attributeType, List *schema)
664577
}
665578
return 0;
666579
}
667-
668-
/*
669-
* MakeArchiveName
670-
* make an archive rel name out of a regular rel name
671-
*
672-
* the CALLER is responsible for freeing the memory allocated
673-
*/
674-
675-
char *
676-
MakeArchiveName(Oid relationId)
677-
{
678-
char *arch;
679-
680-
/*
681-
* Archive relations are named a,XXXXX where XXXXX == the OID of the
682-
* relation they archive. Create a string containing this name and
683-
* find the reldesc for the archive relation.
684-
*/
685-
arch = palloc(NAMEDATALEN);
686-
sprintf(arch, "a,%d", relationId);
687-
688-
return arch;
689-
}

src/backend/commands/recipe.c

+2-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.11 1997/11/20 23:21:10 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.12 1997/11/21 18:09:51 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1047,11 +1047,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
10471047
len = length(q->qtrees[0]->targetList);
10481048
tupdesc = rel->rd_att;
10491049

1050-
relid = heap_create(child->nodeElem->outTypes->val[0],
1051-
NULL, /* XXX */
1052-
'n',
1053-
DEFAULT_SMGR,
1054-
tupdesc);
1050+
relid = heap_create(child->nodeElem->outTypes->val[0], tupdesc);
10551051
}
10561052
else
10571053
{
@@ -1076,9 +1072,6 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
10761072
else
10771073
{
10781074
relid = heap_create(child->nodeElem->outTypes->val[0],
1079-
NULL, /* XXX */
1080-
'n',
1081-
DEFAULT_SMGR,
10821075
tupdesc);
10831076
}
10841077
}

src/backend/commands/sequence.c

-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ DefineSequence(CreateSeqStmt *seq)
151151
}
152152

153153
stmt->relname = seq->seqname;
154-
stmt->archiveLoc = -1; /* default */
155-
stmt->archiveType = ARCH_NONE;
156154
stmt->inhRelnames = NIL;
157155
stmt->constraints = NIL;
158156

0 commit comments

Comments
 (0)