*** pgsql/src/backend/access/common/indextuple.c 2008/01/01 19:45:45 1.85 --- pgsql/src/backend/access/common/indextuple.c 2008/04/17 21:37:28 1.86 *************** *** 9,15 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.84 2007/11/15 21:14:31 momjian Exp $ * *------------------------------------------------------------------------- */ --- 9,15 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/access/common/indextuple.c,v 1.85 2008/01/01 19:45:45 momjian Exp $ * *------------------------------------------------------------------------- */ *************** index_form_tuple(TupleDesc tupleDescript *** 73,79 **** * If value is stored EXTERNAL, must fetch it so we are not depending * on outside storage. This should be improved someday. */ ! if (VARATT_IS_EXTERNAL(values[i])) { untoasted_values[i] = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) --- 73,79 ---- * If value is stored EXTERNAL, must fetch it so we are not depending * on outside storage. This should be improved someday. */ ! if (VARATT_IS_EXTERNAL(DatumGetPointer(values[i]))) { untoasted_values[i] = PointerGetDatum(heap_tuple_fetch_attr((struct varlena *) *************** index_form_tuple(TupleDesc tupleDescript *** 85,92 **** * If value is above size target, and is of a compressible datatype, * try to compress it in-line. */ ! if (!VARATT_IS_EXTENDED(untoasted_values[i]) && ! VARSIZE(untoasted_values[i]) > TOAST_INDEX_TARGET && (att->attstorage == 'x' || att->attstorage == 'm')) { Datum cvalue = toast_compress_datum(untoasted_values[i]); --- 85,92 ---- * If value is above size target, and is of a compressible datatype, * try to compress it in-line. */ ! if (!VARATT_IS_EXTENDED(DatumGetPointer(untoasted_values[i])) && ! VARSIZE(DatumGetPointer(untoasted_values[i])) > TOAST_INDEX_TARGET && (att->attstorage == 'x' || att->attstorage == 'm')) { Datum cvalue = toast_compress_datum(untoasted_values[i]);