When updating a tuple containing compressed-in-line fields, do not
authorTom Lane
Fri, 9 Feb 2001 17:30:03 +0000 (17:30 +0000)
committerTom Lane
Fri, 9 Feb 2001 17:30:03 +0000 (17:30 +0000)
decompress the existing fields unnecessarily.

src/backend/access/heap/tuptoaster.c

index da2f9612a41b98e4559458c1f4e507ab2ec419d0..a1497e40f1f0b16bc42fe1c846ff749ece09083a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.15 2001/01/23 04:32:20 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/access/heap/tuptoaster.c,v 1.16 2001/02/09 17:30:03 tgl Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -349,12 +349,12 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
                toast_action[i] = 'p';
 
            /* ----------
-            * We took care of UPDATE above, so any TOASTed value we find
+            * We took care of UPDATE above, so any external value we find
             * still in the tuple must be someone else's we cannot reuse.
             * Expand it to plain (and, probably, toast it again below).
             * ----------
             */
-           if (VARATT_IS_EXTENDED(DatumGetPointer(toast_values[i])))
+           if (VARATT_IS_EXTERNAL(DatumGetPointer(toast_values[i])))
            {
                toast_values[i] = PointerGetDatum(heap_tuple_untoast_attr(
                    (varattrib *)DatumGetPointer(toast_values[i])));