aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 578af2e66d8..7caab64ce78 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -616,7 +616,7 @@ boot_openrel(char *relname)
app = Typ;
while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- (*app)->am_oid = HeapTupleGetOid(tup);
+ (*app)->am_oid = ((Form_pg_type) GETSTRUCT(tup))->oid;
memcpy((char *) &(*app)->am_typ,
(char *) GETSTRUCT(tup),
sizeof((*app)->am_typ));
@@ -799,20 +799,16 @@ DefineAttr(char *name, char *type, int attnum, int nullness)
* ----------------
*/
void
-InsertOneTuple(Oid objectid)
+InsertOneTuple(void)
{
HeapTuple tuple;
TupleDesc tupDesc;
int i;
- elog(DEBUG4, "inserting row oid %u, %d columns", objectid, numattr);
+ elog(DEBUG4, "inserting row with %d columns", numattr);
- tupDesc = CreateTupleDesc(numattr,
- RelationGetForm(boot_reldesc)->relhasoids,
- attrtypes);
+ tupDesc = CreateTupleDesc(numattr, attrtypes);
tuple = heap_form_tuple(tupDesc, values, Nulls);
- if (objectid != (Oid) 0)
- HeapTupleSetOid(tuple, objectid);
pfree(tupDesc); /* just free's tupDesc, not the attrtypes */
simple_heap_insert(boot_reldesc, tuple);
@@ -946,7 +942,7 @@ gettype(char *type)
app = Typ;
while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
- (*app)->am_oid = HeapTupleGetOid(tup);
+ (*app)->am_oid = ((Form_pg_type) GETSTRUCT(tup))->oid;
memmove((char *) &(*app++)->am_typ,
(char *) GETSTRUCT(tup),
sizeof((*app)->am_typ));