When updating a tuple containing compressed-in-line fields, do not

decompress the existing fields unnecessarily.
This commit is contained in:
Tom Lane 2001-02-09 17:30:03 +00:00
parent b483ad84f8
commit 7fdca53711
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
@ -349,12 +349,12 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
toast_action[i] = 'p'; 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. * still in the tuple must be someone else's we cannot reuse.
* Expand it to plain (and, probably, toast it again below). * 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( toast_values[i] = PointerGetDatum(heap_tuple_untoast_attr(
(varattrib *)DatumGetPointer(toast_values[i]))); (varattrib *)DatumGetPointer(toast_values[i])));