aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap')
-rw-r--r--src/backend/bootstrap/bootparse.y13
-rw-r--r--src/backend/bootstrap/bootstrap.c14
2 files changed, 10 insertions, 17 deletions
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index a50e9ac88d2..113f11de712 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.51 2002/08/30 22:18:05 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.52 2002/09/02 01:05:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -166,20 +166,20 @@ Boot_CreateStmt:
}
RPAREN
{
+ TupleDesc tupdesc;
+
do_start();
+ tupdesc = CreateTupleDesc(numattr, !($4), attrtypes);
+
if ($2)
{
- TupleDesc tupdesc;
-
if (boot_reldesc)
{
elog(DEBUG3, "create bootstrap: warning, open relation exists, closing first");
closerel(NULL);
}
- tupdesc = CreateTupleDesc(numattr, attrtypes);
- tupdesc->tdhasoid = BoolToHasOid(! ($4));
boot_reldesc = heap_create(LexIDStr($5),
PG_CATALOG_NAMESPACE,
tupdesc,
@@ -191,15 +191,12 @@ Boot_CreateStmt:
else
{
Oid id;
- TupleDesc tupdesc;
- tupdesc = CreateTupleDesc(numattr,attrtypes);
id = heap_create_with_catalog(LexIDStr($5),
PG_CATALOG_NAMESPACE,
tupdesc,
RELKIND_RELATION,
$3,
- ! ($4),
true);
elog(DEBUG3, "relation created with oid %u", id);
}
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index ef9ee498dbc..28faa61b294 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.139 2002/08/30 22:18:05 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.140 2002/09/02 01:05:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -493,7 +493,6 @@ boot_openrel(char *relname)
app = Typ;
while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- AssertTupleDescHasOid(rel->rd_att);
(*app)->am_oid = HeapTupleGetOid(tup);
memcpy((char *) &(*app)->am_typ,
(char *) GETSTRUCT(tup),
@@ -677,16 +676,14 @@ InsertOneTuple(Oid objectid)
elog(DEBUG3, "inserting row oid %u, %d columns", objectid, numattr);
- tupDesc = CreateTupleDesc(numattr, attrtypes);
- tupDesc->tdhasoid = BoolToHasOid(RelationGetForm(boot_reldesc)->relhasoids);
+ tupDesc = CreateTupleDesc(numattr,
+ RelationGetForm(boot_reldesc)->relhasoids,
+ attrtypes);
tuple = heap_formtuple(tupDesc, values, Blanks);
-
if (objectid != (Oid) 0)
- {
- AssertTupleDescHasOid(tupDesc);
HeapTupleSetOid(tuple, objectid);
- }
pfree(tupDesc); /* just free's tupDesc, not the attrtypes */
+
simple_heap_insert(boot_reldesc, tuple);
heap_freetuple(tuple);
elog(DEBUG3, "row inserted");
@@ -878,7 +875,6 @@ gettype(char *type)
app = Typ;
while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- AssertTupleDescHasOid(rel->rd_att);
(*app)->am_oid = HeapTupleGetOid(tup);
memmove((char *) &(*app++)->am_typ,
(char *) GETSTRUCT(tup),