8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.81 2000/07/21 11:18:51 wieck Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.82 2000/07/22 11:18:46 wieck Exp $
12
12
*
13
13
*
14
14
* INTERFACE ROUTINES
@@ -1274,10 +1274,6 @@ Oid
1274
1274
heap_insert (Relation relation , HeapTuple tup )
1275
1275
{
1276
1276
Buffer buffer ;
1277
- #ifndef TOAST_INDICES
1278
- HeapTupleHeader plaintdata = NULL ;
1279
- int32 plaintlen = 0 ;
1280
- #endif
1281
1277
1282
1278
/* increment access statistics */
1283
1279
tup -> tableOid = relation -> rd_id ;
@@ -1313,11 +1309,7 @@ heap_insert(Relation relation, HeapTuple tup)
1313
1309
*/
1314
1310
if (HeapTupleHasExtended (tup ) ||
1315
1311
(MAXALIGN (tup -> t_len ) > (MaxTupleSize / 4 )))
1316
- #ifdef TOAST_INDICES
1317
1312
heap_tuple_toast_attrs (relation , tup , NULL );
1318
- #else
1319
- heap_tuple_toast_attrs (relation , tup , NULL , & plaintdata , & plaintlen );
1320
- #endif
1321
1313
#endif
1322
1314
1323
1315
/* Find buffer for this tuple */
@@ -1355,20 +1347,6 @@ heap_insert(Relation relation, HeapTuple tup)
1355
1347
if (IsSystemRelationName (RelationGetRelationName (relation )))
1356
1348
RelationMark4RollbackHeapTuple (relation , tup );
1357
1349
1358
- #ifndef TOAST_INDICES
1359
- if (plaintdata != NULL && tup -> t_data != plaintdata )
1360
- {
1361
- if (tup -> t_datamcxt != NULL && (char * ) (tup -> t_data ) !=
1362
- ((char * ) tup + HEAPTUPLESIZE ))
1363
- {
1364
- MemoryContext oldcxt = MemoryContextSwitchTo (tup -> t_datamcxt );
1365
- pfree (tup -> t_data );
1366
- MemoryContextSwitchTo (oldcxt );
1367
- }
1368
- tup -> t_data = plaintdata ;
1369
- tup -> t_len = plaintlen ;
1370
- }
1371
- #endif
1372
1350
return tup -> t_data -> t_oid ;
1373
1351
}
1374
1352
@@ -1483,11 +1461,7 @@ heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid)
1483
1461
* ----------
1484
1462
*/
1485
1463
if (HeapTupleHasExtended (& tp ))
1486
- #ifdef TOAST_INDICES
1487
1464
heap_tuple_toast_attrs (relation , NULL , & (tp ));
1488
- #else
1489
- heap_tuple_toast_attrs (relation , NULL , & (tp ), NULL , NULL );
1490
- #endif
1491
1465
#endif
1492
1466
1493
1467
LockBuffer (buffer , BUFFER_LOCK_UNLOCK );
@@ -1512,10 +1486,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1512
1486
PageHeader dp ;
1513
1487
Buffer buffer , newbuf ;
1514
1488
int result ;
1515
- #ifndef TOAST_INDICES
1516
- HeapTupleHeader plaintdata = NULL ;
1517
- int32 plaintlen = 0 ;
1518
- #endif
1519
1489
1520
1490
newtup -> tableOid = relation -> rd_id ;
1521
1491
/* increment access statistics */
@@ -1604,11 +1574,7 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1604
1574
if (HeapTupleHasExtended (& oldtup ) ||
1605
1575
HeapTupleHasExtended (newtup ) ||
1606
1576
(MAXALIGN (newtup -> t_len ) > (MaxTupleSize / 4 )))
1607
- #ifdef TOAST_INDICES
1608
1577
heap_tuple_toast_attrs (relation , newtup , & oldtup );
1609
- #else
1610
- heap_tuple_toast_attrs (relation , newtup , & oldtup , & plaintdata , & plaintlen );
1611
- #endif
1612
1578
#endif
1613
1579
1614
1580
/* Find buffer for new tuple */
@@ -1671,21 +1637,6 @@ heap_update(Relation relation, ItemPointer otid, HeapTuple newtup,
1671
1637
RelationInvalidateHeapTuple (relation , & oldtup );
1672
1638
RelationMark4RollbackHeapTuple (relation , newtup );
1673
1639
1674
- #ifndef TOAST_INDICES
1675
- if (plaintdata != NULL && newtup -> t_data != plaintdata )
1676
- {
1677
- if (newtup -> t_datamcxt != NULL && (char * ) (newtup -> t_data ) !=
1678
- ((char * ) newtup + HEAPTUPLESIZE ))
1679
- {
1680
- MemoryContext oldcxt = MemoryContextSwitchTo (newtup -> t_datamcxt );
1681
- pfree (newtup -> t_data );
1682
- MemoryContextSwitchTo (oldcxt );
1683
- }
1684
- newtup -> t_data = plaintdata ;
1685
- newtup -> t_len = plaintlen ;
1686
- }
1687
- #endif
1688
-
1689
1640
return HeapTupleMayBeUpdated ;
1690
1641
}
1691
1642
0 commit comments