From: Tom Lane Date: Fri, 9 Feb 2001 17:30:03 +0000 (+0000) Subject: When updating a tuple containing compressed-in-line fields, do not X-Git-Tag: REL7_1~524 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7fdca537117d1580aa4c637e211ee3d8230b6179;p=postgresql When updating a tuple containing compressed-in-line fields, do not decompress the existing fields unnecessarily. --- diff --git a/src/backend/access/heap/tuptoaster.c b/src/backend/access/heap/tuptoaster.c index da2f9612a4..a1497e40f1 100644 --- a/src/backend/access/heap/tuptoaster.c +++ b/src/backend/access/heap/tuptoaster.c @@ -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])));