|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.73 2000/06/30 16:10:40 petere Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.74 2000/07/02 22:00:27 momjian Exp $ |
12 | 12 | * |
13 | 13 | * |
14 | 14 | * INTERFACE ROUTINES |
@@ -235,6 +235,8 @@ heapgettup(Relation relation, |
235 | 235 | intlinesleft; |
236 | 236 | ItemPointertid= (tuple->t_data==NULL) ? |
237 | 237 | (ItemPointer)NULL :&(tuple->t_self); |
| 238 | + |
| 239 | +tuple->tableOid=relation->rd_id; |
238 | 240 |
|
239 | 241 | /* ---------------- |
240 | 242 | *increment access statistics |
@@ -621,6 +623,7 @@ heap_openr(const char *relationName, LOCKMODE lockmode) |
621 | 623 |
|
622 | 624 | Assert(lockmode >=NoLock&&lockmode<MAX_LOCKMODES); |
623 | 625 |
|
| 626 | + |
624 | 627 | /* ---------------- |
625 | 628 | *increment access statistics |
626 | 629 | * ---------------- |
@@ -1084,6 +1087,7 @@ heap_fetch(Relation relation, |
1084 | 1087 | ItemPointertid=&(tuple->t_self); |
1085 | 1088 | OffsetNumberoffnum; |
1086 | 1089 |
|
| 1090 | +tuple->tableOid=relation->rd_id; |
1087 | 1091 | /* ---------------- |
1088 | 1092 | *increment access statistics |
1089 | 1093 | * ---------------- |
@@ -1178,6 +1182,7 @@ heap_get_latest_tid(Relation relation, |
1178 | 1182 | boolinvalidBlock, |
1179 | 1183 | linkend; |
1180 | 1184 |
|
| 1185 | +tp.tableOid=relation->rd_id; |
1181 | 1186 | /* ---------------- |
1182 | 1187 | *get the buffer from the relation descriptor |
1183 | 1188 | *Note that this does a buffer pin. |
@@ -1270,6 +1275,7 @@ heap_insert(Relation relation, HeapTuple tup) |
1270 | 1275 | *increment access statistics |
1271 | 1276 | * ---------------- |
1272 | 1277 | */ |
| 1278 | +tup->tableOid=relation->rd_id; |
1273 | 1279 | IncrHeapAccessStat(local_insert); |
1274 | 1280 | IncrHeapAccessStat(global_insert); |
1275 | 1281 |
|
@@ -1335,6 +1341,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid) |
1335 | 1341 | Bufferbuffer; |
1336 | 1342 | intresult; |
1337 | 1343 |
|
| 1344 | +tp.tableOid=relation->rd_id; |
1338 | 1345 | /* increment access statistics */ |
1339 | 1346 | IncrHeapAccessStat(local_delete); |
1340 | 1347 | IncrHeapAccessStat(global_delete); |
@@ -1447,6 +1454,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup, |
1447 | 1454 | Bufferbuffer; |
1448 | 1455 | intresult; |
1449 | 1456 |
|
| 1457 | +newtup->tableOid=relation->rd_id; |
1450 | 1458 | /* increment access statistics */ |
1451 | 1459 | IncrHeapAccessStat(local_replace); |
1452 | 1460 | IncrHeapAccessStat(global_replace); |
@@ -1575,6 +1583,7 @@ heap_mark4update(Relation relation, HeapTuple tuple, Buffer *buffer) |
1575 | 1583 | PageHeaderdp; |
1576 | 1584 | intresult; |
1577 | 1585 |
|
| 1586 | +tuple->tableOid=relation->rd_id; |
1578 | 1587 | /* increment access statistics */ |
1579 | 1588 | IncrHeapAccessStat(local_mark4update); |
1580 | 1589 | IncrHeapAccessStat(global_mark4update); |
|